Commit graph

126 commits

Author SHA1 Message Date
Rickard Nilsson be167c3af6 evalExpr: Add support for NLiteralPath 2016-10-18 14:47:14 +02: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
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
Joe Hermaszewski a19a943f9b Derive foldable and traversable for more types 2016-06-29 00:10:09 +01:00
Joe Hermaszewski 295e26b208 Export Delta 2016-06-25 21:56:41 +01:00
Joe Hermaszewski b29218c029 Derive Typeable for Ann 2016-06-25 17:40:21 +01:00
Joe Hermaszewski e87bd3b67a Add instance for Show1 for Annotation and NExprF 2016-06-25 13:29:14 +01:00
Joe Hermaszewski 6c0683eff3 Remove whitespace gobbling from annotateLocation 2016-06-25 12:01:15 +01:00
Joe Hermaszewski 8c55ce604d Add F version to shorthands 2016-06-25 11:48:02 +01:00
Joe Hermaszewski b1658d775f Add location versions of parsing functions 2016-06-25 11:38:06 +01:00
Joe Hermaszewski ea388358ab Reorder things in Annotation.hs 2016-06-25 11:37:50 +01:00
Joe Hermaszewski c11aad7253 Implement Annotation support functions 2016-06-25 11:17:18 +01:00
Joe Hermaszewski 850125ed54 Remove redundant imports 2016-06-23 23:55:19 +01:00
Joe Hermaszewski 3271e0c4c7 Initial work towards annotating expression with their location 2016-06-23 23:54:04 +01:00
Allen Nelson b4eff58b8c mkDots function 2016-02-18 16:52:05 -06:00
Allen Nelson 0a628dafbb implement more shorthand functions 2016-01-28 18:09:38 -06:00
Allen Nelson 99b52fe48e separate expr into types and shorthands 2016-01-25 01:00:27 -06:00
Allen Nelson f04ccf9476 use KeyName list instead of AttrPath list 2016-01-24 18:01:45 -06:00
Allen Nelson 80a7dcb684 bump version, separate back out different kinds of params 2016-01-23 18:11:26 -06:00
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
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
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 892cad2b36 Correctly escape double quotes. Update nix files. Use quotes with reserved variable bindings 2015-10-15 18:38:06 -05:00
Allen Nelson 9765256ab4 parsing variadic functions, avoiding empty list error 2015-06-23 19:19:46 -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
Allen Nelson 1448d3400a adding OverloadedStrings extension, hiding conflicting <$> operator 2015-06-23 11:22:51 -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
Shea Levy 547c76a288 null is a constant added to the base environment, not a reserved word 2014-09-11 15:07:04 -04: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 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
Benno Fünfstück 52a97733d2 Fix pretty printing of escape codes in strings
A line break in a string should not be outputed as a literal linebreak,
but instead must be outputed as an escape code.
2014-08-17 00:02:59 +02:00