Commit graph

128 commits

Author SHA1 Message Date
Ryan Trinkle 7889e2a9e8 Add a couple of tests for inherit scoping 2018-04-14 00:14:26 -04:00
John Wiegley 58b65d2ce1 Don't evaluate to normal form by default in the top level evaluators 2018-04-13 19:29:18 -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 e6abbdc91e Add two more basic parsing tests 2018-04-12 14:22:55 -07:00
John Wiegley 9a089712aa Create new __includes builtin, set by --include/-I 2018-04-11 22:02:31 -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 27c3875934 Use hnix to process nixpkgs in the tests 2018-04-11 13:56:31 -07:00
John Wiegley 978710aa7d Remember how much indentation was stripped from multi-line strings 2018-04-11 12:06:14 -07:00
John Wiegley 3233c9cb31 Restore the pretty show instance for NValue m (orphaned in Pretty for now) 2018-04-10 21:11:46 -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 01d1ae99a7 Fix ind-string-14 2018-04-10 18:45:57 -07:00
John Wiegley 58345c29f9 Mark ind-string-14.nix as broken, since I have no answer for it now 2018-04-10 18:20:58 -07:00
John Wiegley 2a6ba86ad5 Capitalize a test category name 2018-04-10 17:15:23 -07:00
John Wiegley 481d6fa9c1 Don't ignore errors when parsing nixpkgs 2018-04-10 13:17:37 -07:00
Doug Beardsley 375e6025d3 Break out eval-okay-ind-string into separate tests 2018-04-10 14:57:50 -05:00
John Wiegley dcd081d899 Add directory dependency for the tests 2018-04-10 12:38:14 -07:00
Doug Beardsley 13fc5bcd6d Add builtins.split
Finishes issue #113
2018-04-10 12:33:31 -07:00
John Wiegley a7e7e84795 Drop dependency on insert-ordered-containers
Fixes #161
2018-04-10 11:58:08 -07:00
John Wiegley 84f809a568 Add a test for issue #152 2018-04-10 11:22:54 -07:00
John Wiegley 6d275b6093 Make Nixpkgs parsing test also optional (for now) 2018-04-10 11:14:20 -07:00
John Wiegley 586402ad9a Add a test for parsing all of the nixpkgs that we build with 2018-04-10 11:05:22 -07:00
John Wiegley 9d7f25d368 All is building with Megaparsec now, but many parsing tests fail 2018-04-09 17:12:16 -07:00
John Wiegley 4c2eebbe40 Refactor evaluation using a type class 2018-04-09 00:52:10 -07:00
John Wiegley 3681d51dd6 Create modules Nix.Monad.Lazy, Nix.Monad.Lint, Nix.Monad.Context 2018-04-07 23:14:08 -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 954ffccebb Ensure in the tests that hnix.cabal is not edited directly 2018-04-07 12:09:49 -07:00
John Wiegley 443129315d Use hpack and move all the Nix sources into a src/ directory 2018-04-07 12:02:33 -07:00
John Wiegley d9047cc216 Factor out some code into new module Nix.Value 2018-04-07 11:38:12 -07:00
John Wiegley 7df47c7d11 Implement builtins.unsafeGetAttrPos
Fixes #117
2018-04-05 23:16:55 -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 debd240d9d Fix to data presence check 2018-04-04 16:36:15 -07:00
John Wiegley 815748d8ac Update error reports from hnix-tests 2018-04-04 16:33:43 -07:00
Doug Beardsley 06f1bfe508 Merge branch 'master' of github.com:jwiegley/hnix 2018-04-04 16:33:23 -06:00
Doug Beardsley 7281a0732d Fix issue #133 2018-04-04 16:32:21 -06: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 766decad90 Fix the hello.nix test file 2018-04-04 09:26:58 -07:00
John Wiegley 2ea17d7000 Make the language tests output a bit less noisy 2018-04-04 00:05:10 -07:00
Ryan Trinkle 49a5b613d1 Use non-tracing evaluator in tests 2018-04-04 02:00:15 -04:00