Commit Graph

2145 Commits

Author SHA1 Message Date
Allen Nelson 29acdfe988 remove types for rec/nonrec, make unit tests pass 2016-01-23 17:32:45 -06:00
Allen Nelson 50a3d0d0db make tests pass 2016-01-23 15:51:34 -06:00
Allen Nelson d3a1e7207f split into more modules, rename some things, add docs 2016-01-23 15:23:18 -06:00
John Wiegley f60f12f9a0 Merge pull request #30 from anderspapitto/setfix
add some evaluation tests and fix bug
2015-12-21 14:48:23 -05:00
Anders Papitto 00d7f06dd0 add some evaluation tests and fix bug 2015-12-20 22:17:34 -08:00
John Wiegley e7bd5330c1 Merge remote-tracking branch 'origin/pr/29' 2015-12-15 15:21:59 -08:00
John Wiegley 9fc4cae90b Parameterize NValue over 'm', and evalExpr over 'Monad m' 2015-12-15 11:01:56 -08:00
Anders Papitto 267c8cf92d recursive let bindings in evaluation 2015-12-13 22:12:37 -08:00
Anders Papitto ec8f875ff7 implement recursive set binding 2015-12-13 21:41:23 -08:00
Anders Papitto 01557339c1 implement evaluation for attribute lookup 2015-12-13 14:26:45 -08:00
Anders Papitto 5a7991f5b6 implement evaluation for HasAttr 2015-12-13 14:26:37 -08:00
Anders Papitto 9d33172ba4 implement operator evaluation 2015-12-12 23:07:53 -08:00
John Wiegley 58ff3fbbfc Merge pull request #28 from jwiegley/fix_quote_escaping
Fix quote escaping
2015-10-28 09:53:19 -07:00
Allen Nelson a876d49789 parseNixText function 2015-10-27 17:32:03 -05:00
Allen Nelson 64a45f4181 fix path pretty-printing 2015-10-27 17:26:45 -05:00
Allen Nelson f90bcc0f46 Merge pull request #27 from jwiegley/fix_quote_escaping
Minor fixes in pretty printing.
2015-10-15 18:39:49 -05:00
Allen Nelson 892cad2b36 Correctly escape double quotes. Update nix files. Use quotes with reserved variable bindings 2015-10-15 18:38:06 -05:00
John Wiegley c8173f0abd Add Extra-source-files 2015-07-22 19:03:30 -07:00
John Wiegley d678cf9cff Add data/* as Extra-source-files 2015-07-20 14:00:24 -07:00
John Wiegley dddc871d20 Merge pull request #26 from bergmark/patch-1
Needs GHC >= 7.6 due to MultiWayIf, LambdaCase, DataKinds
2015-07-20 13:56:49 -07:00
Adam Bergmark 703f2628e1 Needs GHC >= 7.6 due to MultiWayIf, LambdaCase, DataKinds 2015-06-28 02:13:08 +02:00
Allen Nelson 00ccee4800 Merge pull request #24 from jwiegley/feature/parse_variadic
parsing variadic functions, avoiding empty list error
2015-06-23 22:27:48 -05:00
Allen Nelson 9765256ab4 parsing variadic functions, avoiding empty list error 2015-06-23 19:19:46 -05:00
John Wiegley 365a17144e Merge pull request #22 from adnelson/feature/no_eval_in_main
not evaluating in hnix executable, only parsing
2015-06-23 17:13:17 -05:00
Allen Nelson b4c66b4876 not evaluating in hnix executable, only parsing 2015-06-23 16:53:07 -05:00
John Wiegley 04f210c47e Bump version to 0.2.0 2015-06-23 16:50:03 -05:00
John Wiegley 6bfa6cc84a Merge pull request #20 from adnelson/feature/wrapper_functions
added a bunch of wrapper functions, simpler representation of empties
2015-06-23 14:37:17 -05:00
Allen Nelson 4b514c0d1e added a bunch of wrapper functions, simpler representation of empty lists and sets 2015-06-23 13:32:14 -05:00
John Wiegley 8aab289653 Merge pull request #19 from adnelson/feature/overloaded_strings
adding OverloadedStrings extension, hiding conflicting <$> operator
2015-06-23 12:48:38 -05:00
Allen Nelson 1448d3400a adding OverloadedStrings extension, hiding conflicting <$> operator 2015-06-23 11:22:51 -05:00
John Wiegley d68ba45367 Update default.nix 2015-06-22 20:47:07 -05:00
Benno Fünfstück 1b82727a17 Use data-fix for Fix and fix path parsing bug 2014-09-27 20:12:30 +02:00
John Wiegley 7e9b2e534f Merge pull request #17 from shlevy/null-not-reserved
null is a constant added to the base environment, not a reserved word
2014-09-12 01:56:25 +01:00
Shea Levy 547c76a288 null is a constant added to the base environment, not a reserved word 2014-09-11 15:07:04 -04:00
Shea Levy 9eada9e32d Add shell.nix for easy local development 2014-09-11 14:39:14 -04:00
Benno Fünfstück c89db27dd9 Add some more tests for edge cases 2014-08-31 18:06:55 +02:00
John Wiegley 108800bb76 Update default.nix file 2014-08-28 14:46:21 -05:00
Benno Fünfstück 323f51f97b Rename benchmarks to hnix-benchmarks, like tests 2014-08-28 00:02:56 +02:00
Benno Fünfstück 94b7e4b1d7 tests for comment parsing and parser benchmarks 2014-08-27 23:54:31 +02:00
Benno Fünfstück 3a08227c0c Parse double unary - correctly and improve perf
We now don't use `buildExpressionParser` from parsers because it cannot
deal with double unary `-`, as in `--a`. Because nix doesn't have
operators which have the same precendence but different associativities,
we can greatly simplify the operator parser. This also has the effect of
improving performance and the error messages a bit.
2014-08-27 22:12:12 +02:00
Benno Fünfstück c7a371d902 Use CommentStyle for comment parsing 2014-08-20 18:45:01 +02:00
Benno Fünfstück f3ec70192c parse // in paths correctly as update operator 2014-08-20 15:47:41 +02:00
Benno Fünfstück fe596a3e3a `1 + if true then 1 else 1` should also not parse
Operators are also not allowed to have an `if`, `let`, `with` or `assert`
expression as their argument (just like functions).
2014-08-19 19:20:17 +02:00
Benno Fünfstück 82c19b650c Add Pretty to cabal file and remove Internal 2014-08-19 18:51:13 +02:00
Benno Fünfstück 3413a817e6 subdirectory for main to avoid redundant compile
Cabal builds the library files twice if the main executable and the
library share the same hs-source-dirs. Moving the main executable source
code to a subdirectory avoids this issue.
2014-08-19 18:48:55 +02:00
Benno Fünfstück 2c7a43c929 PrettyPrinter: support let and 2 small fixes 2014-08-18 23:38:38 +02:00
Benno Fünfstück 303fb9a3d7 Fix function application vs operator precedence
We now parse all of all-packages.nix! There are probably still
some parse bugs to catch, though.
2014-08-18 23:06:57 +02:00
Benno Fünfstück 8f0648f5bb Implement indented strings + uri + SPATH
We now parse till line 10005 of all-packages.nix
2014-08-18 22:54:20 +02:00
Benno Fünfstück 76efcb6c7d Fix pretty printing precedence of special operator 2014-08-18 22:13:40 +02:00
Benno Fünfstück c67dcf7c67 Move NSym out of NAtom
An NSym doesn't evaluate to itself and never appears in an NValue, so it
should not be an atom.
2014-08-18 19:08:49 +02:00