Commit Graph

56 Commits

Author SHA1 Message Date
John Wiegley 94e0be3882
Reformat all sources with Brittany, to restore consistency 2019-03-17 14:47:38 -07:00
John Wiegley 537f1fc8c7
Finish out the instance definitions in Standard.hs 2019-03-16 12:48:07 -07:00
John Wiegley 5d9c858f5d
More work toward getting Exec.hs to compile 2019-03-14 23:18:16 -07:00
John Wiegley ace0fc10d5
Further progress 2019-03-14 15:10:41 -07:00
John Wiegley f5726cd015
Further work 2019-03-14 10:56:20 -07:00
John Wiegley 6daaf18018
More work on Value.hs 2019-03-13 23:24:11 -07:00
John Wiegley 9583b7aa70
Introduce IsNThunk t m, with many thanks to Ryan Trinkle 2019-03-13 11:02:53 -07:00
John Wiegley 3cb9834792
Begin abstracting the thunk/value data representation 2019-03-11 22:41:56 -07:00
John Wiegley 39fd51c1a8 Split Nix.Thunk into Nix.Var, Nix.Thunk and Nix.Thunk.Basic
This is in preparation for further generalization of the thunk/value scheme
used by the execution code.
2019-03-11 08:42:46 -07:00
Doug Beardsley 38147f81a9 Fix toJSON context handling and add test case 2018-12-05 14:59:42 -05:00
Doug Beardsley 4b28407936 Fix eval-okay-context test failure 2018-12-03 00:48:15 -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 a29a54b4f9 Merge remote-tracking branch 'origin/pending' into remove-fromnix-text-instances 2018-11-19 07:10:02 -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
Ryan Trinkle 0a82ab26ce Merge remote-tracking branch 'origin/pending' into abstract-scopes 2018-11-18 15:04:30 -05:00
Ken Micklas ff1166aba6 replace *StringIgnoreContextMaybe with more accurate *GetStringNoContext 2018-11-17 18:40:22 -05:00
Ryan Trinkle c2be721454 Factor out HTTP requests 2018-11-16 17:17:38 -05:00
gb 4baa4f7108 change Nix.NixString module to Nix.String 2018-09-23 16:03:44 -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 ea3b675f28 update fork from master 2018-07-28 13:23:23 -04:00
gb 43c145252d NixString is in its own module hiding the constructors 2018-05-08 16:47:50 -04:00
John Wiegley 449d6611df
Remove the Uri type, it's just sugar
Fixes #308
2018-05-08 12:15:50 -07:00
gb 8e7d9d32fa add string context 2018-05-03 08:07:54 -04:00
John Wiegley acda2b3337 Use Exception rather than Frame, reduce constraints imposed by forceThunk 2018-05-01 20:34:41 -04:00
John Wiegley 5f4a4096cf Whitespace fix 2018-04-25 20:46:46 -07:00
John Wiegley 7759d171e8 Add new convertNix function in Convert.hs 2018-04-25 20:22:31 -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 3cf02e3902 Track value provenance during evaluation 2018-04-22 14:33:38 -07:00
John Wiegley a63d3ac30d Remove some commented out code 2018-04-22 14:33:38 -07:00
John Wiegley 8003b96f9c In Nix.Convert, instance are now for NValueF m r instead of NValue m
This will allow the re-use of many of these instances for NValueLoc m.
2018-04-21 18:18:03 -07:00
John Wiegley 7188c71d0a Add more evaluation context information, for -v2 or higher 2018-04-18 16:12:31 -07:00
John Wiegley 91f7feb615 More work on path coercions 2018-04-17 21:49:29 -07:00
John Wiegley 718b6e4220 Also coerce URIs to paths 2018-04-17 21:43:57 -07:00
John Wiegley 25f1e02966 Coerce URIs to strings 2018-04-17 21:41:26 -07:00
John Wiegley f7d4374da5 Sets can coerce to strings if they contain an "outPath" key 2018-04-17 19:10:36 -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 3901a32e15 Remove MText abstraction, which also duplicated effort in Nix.Convert 2018-04-16 10:56:29 -07:00
John Wiegley df9092b4d2 Allow implicit coercion from paths to strings via FromValue/FromNix 2018-04-16 10:55:57 -07:00
John Wiegley c7ad39b151 Fix error reporting due to failed conversions 2018-04-16 10:54:55 -07:00
John Wiegley 18337535ca Allow coercion from floats to integers 2018-04-16 10:12:29 -07:00
John Wiegley 5711f96743 Add a missing Path coercion 2018-04-16 10:12:15 -07:00
John Wiegley ddb125aea9 Add new instances in Nix.Convert 2018-04-15 23:00:09 -07:00
John Wiegley dacd0ca0db Restore the "normal form recursive" ToNix/FromNix type classes
This allows for very easily written Builtins
2018-04-15 20:43:04 -07:00
John Wiegley 230eb99ade Rename fromNixMay -> fromValueMay 2018-04-15 20:22:24 -07:00
John Wiegley fb6191c949 Rename the internal version of ToNix/FromNix to ToValue/FromValue 2018-04-15 19:05:44 -07:00
John Wiegley ef82d5e9f2 Make ToNix monadic, to avoid making any assumptions about its use 2018-04-15 16:21:47 -07:00