Doug Beardsley
38147f81a9
Fix toJSON context handling and add test case
2018-12-05 14:59:42 -05:00
Doug Beardsley
ab3fc101dd
Merge branch 'master' into remove-fromnix-text-instances
2018-11-29 10:36:03 -05:00
Domen Kožar
2cc20c045f
Distinguish string with or without context when revealing type
2018-11-20 12:20:16 +00:00
Doug Beardsley
752ff745a8
Remove unnecessary cases
2018-11-19 07:13:19 -05:00
Doug Beardsley
5dd3e2d7ce
Remove Text FromValue, ToValue, FromNix, and ToNix
...
This commit makes the handling of string context much more explicit and correct
throughout entire codebase.
2018-11-19 07:04:08 -05:00
Ken Micklas
ff1166aba6
replace *StringIgnoreContextMaybe with more accurate *GetStringNoContext
2018-11-17 18:40:22 -05:00
Ken Micklas
c9071db5bc
Use custom force for isDerivation instead of relying on valueEq
2018-11-17 18:40:22 -05:00
Ken Micklas
a7bdda4912
Ignore context when comparing strings
2018-11-17 18:40:22 -05:00
Ken Micklas
8dc1762f8e
Use curry and LambdaCase for valueEq
2018-11-17 18:40:22 -05:00
gb
4baa4f7108
change Nix.NixString module to Nix.String
2018-09-23 16:03:44 -04:00
gb
be056b3dd7
builds with -Werror -Wno-deprecations
2018-09-16 16:30:24 -04:00
gb
ae6725871b
removed executable permissions
2018-09-15 20:32:38 -04:00
gb
6f1ed3c2e9
documented methods;added more methods with deprecation
2018-09-15 20:04:54 -04:00
gb
2fadbe3090
add new nixstring version with warnings
2018-09-09 11:01:09 -04:00
gb
9c3e5e995c
update fork from master contd
2018-07-28 14:17:37 -04:00
gb
43c145252d
NixString is in its own module hiding the constructors
2018-05-08 16:47:50 -04:00
gb
82c0d917e9
add hashable import
2018-05-08 14:40:49 -04:00
John Wiegley
f1faf50bcb
Merge branch 'master' into string_context_255
2018-05-06 10:47:23 -07:00
John Wiegley
e7a6456a35
Make use of lens-family to provide some utility lenses/traversals
2018-05-06 10:43:43 -07:00
gb
8e7d9d32fa
add string context
2018-05-03 08:07:54 -04:00
John Wiegley
8538859230
Work on type inference for functions that take attr sets
2018-05-01 21:50:50 -04:00
John Wiegley
acda2b3337
Use Exception rather than Frame, reduce constraints imposed by forceThunk
2018-05-01 20:34:41 -04:00
Tim Sears
a49a424813
add builtins.mul, issue #250
2018-04-29 11:43:06 -07:00
Tim Sears
43bb8d0558
allow floating point values to be used with builtins.add. Fixes Issue #207 .
2018-04-28 15:22:28 -07:00
John Wiegley
3b304561f7
Make div dispatch on value types
2018-04-28 15:01:12 -07:00
John Wiegley
d0b5ccde77
Initial implementation of genericClosure
2018-04-28 14:56:20 -07:00
John Wiegley
6c2149f767
Remove code TODOs, which have been changed into GitHub issues
2018-04-26 17:13:22 -07:00
John Wiegley
b83ccb40f3
Add provenance to thunks, and allow provenance to stack
2018-04-24 21:41:23 -07:00
John Wiegley
01bcb86d3f
Further improvements to error rendering, but not all done yet
2018-04-24 11:12:20 -07:00
John Wiegley
9864a8c7a5
Rework the way that info frames and error are handled
...
There is still work to be done to render the new "typed frames", and to
convert all the current string based frame into typed frames. This will pave
the way forward to smarter error messages that can be browsed in intelligent
environments like Emacs and the browser.
2018-04-24 02:15:28 -07:00
John Wiegley
2aa418d60a
Record contextual provenance more fully in some places
2018-04-23 10:18:47 -07:00
John Wiegley
4ff0c483bf
Improve printing of provenance information, add more info
2018-04-23 10:06:49 -07:00
John Wiegley
3cf02e3902
Track value provenance during evaluation
2018-04-22 14:33:38 -07:00
John Wiegley
e7ec507db8
Use Void to make an intention clearer
2018-04-18 13:28:19 -07:00
John Wiegley
01bf245e31
Simplify a function in Eval.hs using Nix.Convert
2018-04-17 14:59:24 -07:00
John Wiegley
c9158273a4
Change all builtins to go from m (NValue m) -> m (NValue m)
...
This avoids a needless thunk encapsulation.
2018-04-16 21:39:41 -07:00
John Wiegley
7f9a7c5ce8
Remove posFromSourcePos, it is no longer needed
2018-04-14 23:55:37 -07:00
John Wiegley
38b24f5fc1
Add new helper function isClosureNF
2018-04-11 20:22:06 -07:00
John Wiegley
39e175be85
Rename some helper functions
2018-04-11 20:21:34 -07:00
John Wiegley
805ea3ecc5
Resolve a warning
2018-04-11 14:35:30 -07:00
John Wiegley
031826f01b
Remove the Convertible type constraint synonym
2018-04-11 14:16:33 -07:00
John Wiegley
3233c9cb31
Restore the pretty show instance for NValue m (orphaned in Pretty for now)
2018-04-10 21:11:46 -07:00
John Wiegley
9d7f25d368
All is building with Megaparsec now, but many parsing tests fail
2018-04-09 17:12:16 -07:00
John Wiegley
9beb9364e0
The Megaparsec version of Parser.hs is at least compiling
2018-04-09 16:11:31 -07:00
John Wiegley
8da8ea2b66
Remove unnecessary strictness annotations from types
...
This improves speed a bit on my system, parsing all the nixpkgs files.
2018-04-09 00:59:50 -07:00
John Wiegley
4c2eebbe40
Refactor evaluation using a type class
2018-04-09 00:52:10 -07:00
John Wiegley
f6eb4c1353
Store a closure in NVClosure, instead of passing the scope
2018-04-07 22:46:05 -07:00
John Wiegley
39e859fab5
Make use of Nix.Normal, move some more code to Nix.Value
2018-04-07 17:24:22 -07:00
John Wiegley
31e6aa8fb9
Implement __curPos as a primitive action during evaluation
2018-04-07 16:35:11 -07:00
John Wiegley
9dcd7b37b6
Factor some code into new module Nix.Normal
2018-04-07 15:25:39 -07:00