Commit graph

46 commits

Author SHA1 Message Date
John Wiegley 68d81dd57c More work on provenance reporting 2018-04-24 23:09:43 -07:00
John Wiegley 2de8c7cf84 More fixes to error reporting 2018-04-24 12:25:40 -07:00
John Wiegley 01bcb86d3f Further improvements to error rendering, but not all done yet 2018-04-24 11:12:20 -07:00
John Wiegley 9864a8c7a5 Rework the way that info frames and error are handled
There is still work to be done to render the new "typed frames", and to
convert all the current string based frame into typed frames. This will pave
the way forward to smarter error messages that can be browsed in intelligent
environments like Emacs and the browser.
2018-04-24 02:15:28 -07:00
John Wiegley c3f34e62ce Use verbosity to control how much is displayed in error messages 2018-04-17 17:25:59 -07:00
John Wiegley 451ccf7c60 Fix test eval-okay-autoargs 2018-04-15 02:22:33 -07:00
John Wiegley cce65fb106 Add argument processing for the tests; test still not working yet 2018-04-15 02:16:06 -07:00
John Wiegley 7f6a64da04 More corrections to the search path logic
Fixes #112
2018-04-13 16:37:11 -07:00
John Wiegley 78b185c5b5 Add a strange hack needed to get a test to run 2018-04-13 01:20:58 -07:00
John Wiegley ef489753e7 Fix to find env path 2018-04-13 00:52:09 -07:00
John Wiegley 14bc5360f4 More work on supporting -I and completing env paths 2018-04-13 00:34:49 -07:00
John Wiegley 99189e9536 The basic REPL now works; doesn't allow establishing definitions yet 2018-04-12 16:46:34 -07:00
John Wiegley 90e4a3ec37 Add preliminary parsing of .flags files, though more work is needed 2018-04-11 21:02:37 -07:00
John Wiegley 74de14dc7d Restore the linter, to some degree, at least for the language tests 2018-04-10 21:02:01 -07:00
John Wiegley 4c2eebbe40 Refactor evaluation using a type class 2018-04-09 00:52:10 -07:00
Ryan Trinkle 1ada8648f2 Fix comparison of derivations 2018-04-07 20:15:55 -04:00
John Wiegley 85b7799246 Quiet some warnings 2018-04-07 15:15:22 -07:00
John Wiegley c8e9012778 Some minor fixups for compilation 2018-04-07 15:13:58 -07:00
Doug Beardsley 3d98bc8e05 Revert import change 2018-04-07 15:07:09 -07:00
Doug Beardsley 1b7dac071d Test to catch a bug in builtins.match
Also added infrastructure for comparing against current nix behavior,
not just current nix tests.
2018-04-07 15:07:09 -07:00
John Wiegley ea6a98f602 Implement builtins.tryEval 2018-04-07 14:33:15 -07:00
John Wiegley d9047cc216 Factor out some code into new module Nix.Value 2018-04-07 11:38:12 -07:00
Doug Beardsley a074ede2f1 Remove old comment 2018-04-05 17:06:00 -06:00
Doug Beardsley 42fbb1faa9 The eval-okay-xml test case passes
Still need to decide what to do with commented out instances
2018-04-05 17:06:00 -06:00
Doug Beardsley 873d0f8ec0 WIP XML serializer for NVClosure
Seems to be working except for mismatches in tag ordering
2018-04-05 17:03:14 -06:00
John Wiegley a1fdb35be0 __curPos requires that we evaluation with location info
Fixes #125
2018-04-05 00:12:27 -07:00
John Wiegley c6f2da7409 Use the ST monad for running the linter
The only place where IO is needed is to read the source file when reporting
errors, so for now I just use unsafeIOToST for this one effect, since it
refers to data that should be immutable for the duration of the linting run.
2018-04-04 13:36:00 -07:00
John Wiegley 2ea17d7000 Make the language tests output a bit less noisy 2018-04-04 00:05:10 -07:00
Ryan Trinkle bc753fda5f Ignore tests ending in ".exp.disabled" 2018-04-03 23:54:29 -04:00
John Wiegley c3eb7a94b9 Add basic support for quasi-quotation of Nix expressions in Haskell 2018-04-03 14:21:33 -07:00
John Wiegley c50bf1a9f6 Preserve more information in __cur_file rather than __cwd 2018-04-02 19:57:05 -07:00
John Wiegley 1dede9334a Correction to the tests 2018-04-01 10:55:23 -07:00
John Wiegley d08ca26da0 Add informative backtraces on evaluation failure 2018-03-30 23:10:44 -07:00
John Wiegley 74cc1a2ad5 Split MonadNix into evaluation and environmental effects 2018-03-30 14:25:03 -07:00
John Wiegley 9f6c2ba948 Move a lot of code around into new modules 2018-03-30 14:08:38 -07:00
John Wiegley a4a2fc0659 Move the linting code into its own module 2018-03-30 12:45:23 -07:00
John Wiegley 22924a591f Implement getEnv, set TEST_VAR=foo for the language tests 2018-03-30 02:16:52 -07:00
John Wiegley c234849fd6 Fix a few tests by making a small change to printNix 2018-03-30 02:07:08 -07:00
John Wiegley 8e944cc223 Fix the tests 2018-03-30 02:00:36 -07:00
John Wiegley 4e698d76fa More fixes to lazy evaluation and scoping 2018-03-30 01:11:27 -07:00
John Wiegley 8f24c7b645 Implement laziness, although without support for concurrency 2018-03-29 15:35:12 -07:00
John Wiegley dfee8cd2b8 Add checkExpr, which checks for errors in Nix expressions
This allows us to pass 10 more of the NixLanguageTests, so that after parsing
a file containing "x: y", we can report that y is undefined.
2018-03-28 16:27:35 -07:00
John Wiegley 39f772ef3c Restore monadic abstraction (to support importFile), fix attribute sets 2018-03-28 14:45:10 -07:00
John Wiegley 3a29249e43 Normalize import statements, add option parsing 2018-03-27 21:59:27 -07:00
John Wiegley 1e0e47d064 Remove monadic context from evalExpr: we weren't using it! 2018-03-27 19:07:08 -07:00
Guillaume Maudoux 25f1da3408 Run lang tests from upstream 2018-02-15 12:06:09 +01:00