Domen Kožar
b821021cac
Merge {build,shell,default}.nix into default.nix
...
cabal2nix generates all of them in one go.
2018-01-28 21:58:33 +00:00
John Wiegley
a28a8397cd
Merge pull request #77 from domenkozar/prettyprinter-fixes
...
Prettyprinter fixes
2018-01-28 11:26:20 -08:00
John Wiegley
e5f9b13e5a
Merge pull request #79 from madjar/pretty-value
...
Add a pretty-printer for NValue
2018-01-28 11:24:42 -08:00
Georges Dubus
e733986f3c
Add a pretty-printer for NValue
...
The implementation is a bit hacky: we convert the NValue to a NExpr, which
let us reuse the ast pretty-printing logic.
This commit also moves `atomText` from `Nix.Pretty` to `Nix.Eval` to avoid a
circular dependency. I don't have a strong argument for that, except that the
pretty-printer depending from the evaluator makes a bit more sense than other
way around.
2018-01-28 18:21:57 +01:00
Domen Kožar
b391db0bf6
assert and with should be followed with a newline
2018-01-28 13:08:43 +00:00
Domen Kožar
22097ebe1c
dedent 'in' in 'let in'
2018-01-28 13:08:09 +00:00
Domen Kožar
f867c2ccbb
Indent first line after functions
2018-01-28 13:07:36 +00:00
Domen Kožar
f61fe5d53b
Format functions with args with newlines
2018-01-28 13:06:59 +00:00
John Wiegley
a0264c1f0c
Merge pull request #76 from madjar/fix-recset
...
Fix recset evaluation logic
2018-01-27 00:40:08 -08:00
Georges Dubus
3ffba374ae
Fix recset evaluation logic
...
Before, an evaluation of a recset would contain all the environment. Eg:
```
>>> let a = 4; in rec {x = 2;}
{x = 2; a = 4;}
```
This commit changes it to only contain the values actually bound in the set:
```
>>> let a = 4; in rec {x = 2;}
{x = 2;}
```
2018-01-26 13:19:14 +01:00
John Wiegley
8b47c8b143
Add back *.nix files for the sake of Travis
2018-01-22 18:38:04 -08:00
John Wiegley
054eb3ced5
Mention the use of cabal2nix in README.md
2018-01-22 12:15:03 -08:00
John Wiegley
d3f9302c9f
Bump Cabal version to 0.4
2018-01-22 12:13:30 -08:00
John Wiegley
376bde416d
Delete project.nix
2018-01-22 12:13:21 -08:00
John Wiegley
41f631730c
Add Makefile and .gitignore
2018-01-22 11:52:22 -08:00
John Wiegley
0bda6da9e1
Remove generated files
2018-01-22 11:51:06 -08:00
John Wiegley
23363bd3a3
Merge pull request #72 from vaibhavsagar/travis
...
Test with Travis
2017-12-29 14:10:28 -08:00
Vaibhav Sagar
2960a01f09
.travis.yml: init
2017-12-29 11:51:01 +08:00
John Wiegley
db3f054a38
Merge pull request #71 from vaibhavsagar/eq1
...
Nix/Expr/Types.hs: add Eq1 instances
2017-12-27 09:56:59 -08:00
Vaibhav Sagar
130186400c
Nix/Expr/Types.hs: add Eq1 instances
2017-12-27 17:11:57 +08:00
John Wiegley
07cbf0e56e
Merge pull request #69 from vaibhavsagar/import-nix-expr
...
Import Nix.Expr so main/Main.hs compiles
2017-11-29 08:42:29 -08:00
Vaibhav Sagar
ab52fb8d00
Import Nix.Expr so main/Main.hs compiles
2017-11-29 17:42:12 +08:00
John Wiegley
35a7f64467
Merge pull request #66 from rickynils/eval_env_path
...
evalExpr: Add support for NEnvPath
2017-10-18 09:59:17 -07:00
Rickard Nilsson
bd39df38b6
evalExpr: Add support for NEnvPath
2017-10-18 16:09:06 +02:00
John Wiegley
4df691d2b3
Merge pull request #64 from vaibhavsagar/refactor-main
...
Reduce code duplication in main/Main.hs
2017-09-23 07:52:40 -07:00
Vaibhav Sagar
397dd29297
Reduce code duplication in main/Main.hs
2017-09-23 20:00:18 +08:00
John Wiegley
b1a04469bb
Merge pull request #59 from rimmington/dollar-quoting
...
Dollar quoting
2017-05-31 10:54:27 -07: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
John Wiegley
aba54891c5
Merge pull request #56 from Profpatsch/mkDots-automatic-symbol-quoting
...
mkDots automatic symbol quoting
2017-04-21 11:31:18 -07: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
Profpatsch
f72a083f0b
default.nix: use default haskellPackages by default
...
sane defaults ;)
2017-04-21 03:53:35 +02:00
John Wiegley
851aaf92ff
Merge pull request #54 from rimmington/ident-reserved-prefix
...
Correctly parse identifiers with reserved word prefixes
2017-04-17 10:05:39 -07:00
Rhys
c15de4532a
Correctly parse identifiers with reserved word prefixes
2017-04-17 19:33:57 +10:00
John Wiegley
38f6413075
Fix GitHub URL
...
Fixes #49
2016-12-20 21:13:54 -08:00
John Wiegley
07e9e66bf7
Change LICENSE to BSD3
2016-12-18 17:10:06 -08:00
John Wiegley
35f2a2248b
Merge pull request #46 from rickynils/bump_to_0_3_4
...
Bump to 0.3.4
2016-10-20 16:24:54 -07:00
Rickard Nilsson
386c472cc7
Bump to 0.3.4
2016-10-20 22:04:00 +02:00
John Wiegley
dd70e17de5
Merge pull request #45 from rickynils/eval_literal_path
...
evalExpr: Add support for NLiteralPath
2016-10-18 09:08:43 -07:00
Rickard Nilsson
be167c3af6
evalExpr: Add support for NLiteralPath
2016-10-18 14:47:14 +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
John Wiegley
2c88bdb9e4
Merge pull request #42 from expipiplus1/ghc8
...
Add Show1 instances for base 4.9
2016-10-03 20:05:30 -07:00
John Wiegley
6769a2f007
Update version to 0.3.2
2016-10-03 10:07:20 -07:00
John Wiegley
4f42496ae9
Merge pull request #41 from expipiplus1/simple-functor
...
Use fmapDefault and foldMapDefault
2016-09-21 13:10:35 -07:00
Joe Hermaszewski
f8fa161f5b
Use fmapDefault and foldMapDefault
2016-09-21 10:33:18 +01:00
Joe Hermaszewski
d3651984fb
Add Show1 instances for base 4.9
2016-09-21 10:32:17 +01:00
John Wiegley
e2b80391bb
Merge pull request #38 from expipiplus1/derive
...
Derive foldable and traversable for more types
2016-06-29 13:33:29 -07:00
Joe Hermaszewski
a19a943f9b
Derive foldable and traversable for more types
2016-06-29 00:10:09 +01:00
John Wiegley
e5f64d5387
Merge pull request #35 from expipiplus1/annotate
...
WIP: Annotate expressions with their location
2016-06-28 12:06:54 -07:00