Commit graph

113 commits

Author SHA1 Message Date
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
Ryan Trinkle bc753fda5f Ignore tests ending in ".exp.disabled" 2018-04-03 23:54:29 -04:00
Ryan Trinkle c506464d99 Fix default_value_in_atpattern
Default values are *not* added to @-bound variables in Nix (checked with nix-repl)
2018-04-03 22:21:19 -04:00
John Wiegley 973d6d873b Add an evaluation test for issue #108 2018-04-03 14:43:40 -07:00
John Wiegley c3eb7a94b9 Add basic support for quasi-quotation of Nix expressions in Haskell 2018-04-03 14:21:33 -07:00
Ryan Trinkle 0a6ad5114d Merge branch 'master' of github.com:jwiegley/hnix 2018-04-03 12:36:51 -04:00
John Wiegley c50bf1a9f6 Preserve more information in __cur_file rather than __cwd 2018-04-02 19:57:05 -07:00
Ryan Trinkle 4992eaecbe Fix parsing of 4/2 (it should parse as a path) 2018-04-02 19:50:33 -04:00
John Wiegley 144972f8a3 Correctly propagate unification results to 1 level deep 2018-04-02 15:32:55 -07:00
John Wiegley ffb97610db Generalize the thunking mechanism, so it can be used over Symbolics 2018-04-01 23:48:07 -07:00
John Wiegley d7228c6a75 Move language feature pragmas into each Haskell file, not .cabal 2018-04-01 22:49:12 -07:00
John Wiegley 2e83606451 Simplify the definition of ParamSet 2018-04-01 20:56:57 -07:00
John Wiegley 1dede9334a Correction to the tests 2018-04-01 10:55:23 -07:00
John Wiegley 852aff04e7 Break apart MonadNix, to allow greater flexibility in evaluators 2018-03-31 14:53:38 -07:00
John Wiegley b89b795abe Some improvements to error traces 2018-03-30 23:10:44 -07:00
John Wiegley d08ca26da0 Add informative backtraces on evaluation failure 2018-03-30 23:10:44 -07:00