John Wiegley
deb592b11d
Undo changes to hnix.cabal
2018-04-07 15:08:48 -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
935c7c5ee1
Remove some unnecessary code from package.yaml
2018-04-07 14:17:17 -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
Doug Beardsley
002a7ad1b9
Replace pcre-light with regex-tdfa
...
The regex-tdfa package implements POSIX extended regular expressions,
which are what Nix uses.
2018-04-06 11:46:56 -06:00
John Wiegley
1a01f85de9
Implement builtins.match, and add a dependency on pcre-light
2018-04-05 23:50:32 -07:00
John Wiegley
9d5a7f8a27
Remove some settings from hnix.cabal
2018-04-05 21:10:06 -07: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
John Wiegley
51b55f3e2d
Pin insert-ordered-containers to a custom version
2018-04-05 13:23:22 -07:00
John Wiegley
1363d20f18
Bump working version to 0.5.0
2018-04-05 13:23:14 -07:00
John Wiegley
d476b3f173
Add a toXML serializer for values
...
Relates to issue #109
2018-04-05 01:13:13 -07:00
Ryan Trinkle
3c339340c6
Add builtins.fromJSON and builtins.toJSON
2018-04-03 20:37:38 -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
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
Ryan Trinkle
5fc350cef0
Add builtins.readDir
2018-04-01 22:16:55 -04:00
Ryan Trinkle
fb1616053d
Add builtins.hashString
2018-04-01 21:20:53 -04:00
Ryan Trinkle
81aec9dfd0
Merge branch 'master' of github.com:jwiegley/hnix
...
# Conflicts:
# Nix/Builtins.hs
# Nix/Eval.hs
2018-04-01 14:35:06 -04:00
Ryan Trinkle
a1a3c81211
Add builtins.sort
2018-04-01 14:16:47 -04:00
John Wiegley
f47b764dcf
Initial phase of sym eval completed, still missing function application
2018-04-01 10:34:08 -07:00
Ryan Trinkle
3e3e61acd9
Add more path normalization to do it the way Nix does
2018-03-31 19:53:35 -04:00
Ryan Trinkle
6acdfb061c
Add version bounds for unordered-containers
...
We use the Ord instance for HashMap, which was created in unordered-containers-0.2.9.0
2018-03-31 18:46:42 -04:00
John Wiegley
852aff04e7
Break apart MonadNix, to allow greater flexibility in evaluators
2018-03-31 14:53:38 -07:00
John Wiegley
d08ca26da0
Add informative backtraces on evaluation failure
2018-03-30 23:10:44 -07:00
John Wiegley
4e29e6453f
Don't use -threaded in hnix.cabal at the moment
2018-03-30 23:10:44 -07:00
John Wiegley
9f6c2ba948
Move a lot of code around into new modules
2018-03-30 14:08:38 -07:00
John Wiegley
5effdda04b
Move the scoping code into its own module
2018-03-30 13:30:28 -07:00
John Wiegley
a4a2fc0659
Move the linting code into its own module
2018-03-30 12:45:23 -07:00
John Wiegley
71b4bf5e8a
Various fixes, and make imports local to their containing file
2018-03-30 01:50:19 -07:00
Ryan Trinkle
3f29f65477
Use nix-store --add to convert paths to strings
...
Fixes eval-fail-bad-antiquote-2
2018-03-29 20:23:22 -04:00
John Wiegley
84918aa1d3
Remove the MonadFix requirement, it was not needed; fix NRecSet
2018-03-28 23:52:07 -07:00
John Wiegley
39f772ef3c
Restore monadic abstraction (to support importFile), fix attribute sets
2018-03-28 14:45:10 -07:00
John Wiegley
b923af49f4
Split off some utility functions into their own Nix.Utils module
2018-03-27 22:32:43 -07:00
John Wiegley
3a29249e43
Normalize import statements, add option parsing
2018-03-27 21:59:27 -07:00
John Wiegley
278916a9ab
Further work on argument evaluation
2018-03-27 18:42:31 -07:00
David Johnson
37e457367b
Bump deriving-compat upper bound
2018-03-27 12:34:56 -07:00
Allen Nelson
e6be5e0096
rm mention of shorthandtests from cabal file
2018-02-28 11:34:50 -06:00
Guillaume Maudoux
25f1da3408
Run lang tests from upstream
2018-02-15 12:06:09 +01:00
Guillaume Maudoux
5718952e7b
Add NValue constructors for builtins
2018-02-15 12:05:23 +01:00
John Wiegley
d3f9302c9f
Bump Cabal version to 0.4
2018-01-22 12:13:30 -08:00
Rhys
0d456691b5
Escape ${ but not plain $ in indented strings
...
Includes some very basic regression tests, but no change for
non-indented strings.
2017-05-31 21:24:43 +10:00
Rhys
6537b8823d
Add ShorthandTests to .cabal file
2017-05-31 21:07:19 +10:00
Profpatsch
8b4c137a3b
Shorthands.hs, mkDot/mkDots: automatically quote non-symbols
...
Nix can accept (nearly?) arbitrary values as attributes, if they are quoted in
strings. So generating “dots” should always result in valid nix attributes.
This uses the same regex as the nix lexer (as of 1.11).
Also add a few tests whether it correctly generates symbol/non-symbol
attributes.
2017-04-21 03:54:06 +02:00
Rickard Nilsson
386c472cc7
Bump to 0.3.4
2016-10-20 22:04:00 +02:00
John Wiegley
3a23917d59
Mention EvalTests.hs in hnix.cabal
2016-10-17 16:59:52 -07:00
John Wiegley
2f06b934ef
Bump to 0.3.3
2016-10-03 20:10:35 -07:00
Joe Hermaszewski
d3651984fb
Add Show1 instances for base 4.9
2016-09-21 10:32:17 +01:00