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
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
0b812d5c94
Correctly support 'with' by distinguishing weak scopes from non-weak
2018-03-30 13:18:24 -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
b456eba4d6
Add some test files
2018-03-30 01:14:06 -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
84918aa1d3
Remove the MonadFix requirement, it was not needed; fix NRecSet
2018-03-28 23:52:07 -07:00
John Wiegley
d77e52e9d4
Don't run the language tests (say, on Travis) unless LANGUAGE_TESTS=yes
2018-03-28 16:30:54 -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
124530c9a9
Fix at-right patterns
2018-03-27 22:53:52 -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
John Wiegley
278916a9ab
Further work on argument evaluation
2018-03-27 18:42:31 -07:00
John Wiegley
ecd18e3da3
Merge branch 'master' into fix-recursive-argument-set
2018-03-27 14:34:28 -07:00
Georges Dubus
2e26bd75a5
Fix a bug where defaultargs are absent from the atpattern argument
2018-03-11 12:15:33 +01:00
Georges Dubus
0f7332636e
Add support for variadic parameters
...
Everything was already in place, but not used for variadic parameters.
On the other hand fixed parameters sets are currently bugged, as they don't
reject extra arguments (they act like variadic parameters set). This commit adds
a TODO mentionning that.
2018-03-09 14:09:43 +01:00
Kosyrev Serge
0693768550
Fix #93 : true/false being mis-parsed when part of an attribute name.
2018-03-06 04:14:16 +03:00
Georges Dubus
6a8ae208b4
Use environment in evaluation of function definitions
2018-03-01 20:04:54 +01:00
Allen Nelson
46bb504ccc
whack that mole
2018-02-28 11:45:34 -06:00