Anton-Latukha
87714a9849
Effects: Basic: LANGUAGE: rm unused RankNTypes
2019-06-25 20:24:12 +02:00
Anton-Latukha
5220e67b84
Effects: Basic: LANGUAGE: rm unused TypeFamilies
2019-06-25 20:24:12 +02:00
Anton-Latukha
ed21133a4f
Effects: Basic: LANGUAGE: rm unused UndecidableInstances
2019-06-25 20:24:12 +02:00
Anton-Latukha
9de5830232
Effects: Basic: LANGUAGE: rm unused AllowAmbigousTypes
2019-06-25 20:24:12 +02:00
Anton-Latukha
fadc645551
Effects: Basic: upd η-reduce findPathM
2019-06-25 20:24:12 +02:00
Anton-Latukha
cc1e0d208a
Effects: Basic: LANGUAGE: rm unused TypeSynonimInstances
2019-06-25 20:24:12 +02:00
Anton-Latukha
bf226596d3
Effects: Basic: LANGUAGE: rm unused GeneralizedNewtypeDeriving
2019-06-25 20:24:12 +02:00
Anton-Latukha
1197ffdc8a
Effects: Basic: LANGUAGE: rm unused DeriveFunctor
2019-06-25 20:24:12 +02:00
Anton-Latukha
2824bd8d0a
Effects: Basic: defaultDerivationStrict: upd use infix `demand`
2019-06-25 20:24:12 +02:00
Linus Heckemann
a57fc62d84
exec: fix some list and null behaviour
...
null is not equal to the empty list, and cannot be concatenated to
either end of a list.
2019-06-25 20:23:50 +02:00
Linus Heckemann
600fdb93e8
types: fix type of concat binop
...
Nix's ++ does not in fact allow concatting null with a list:
nix-repl> [] ++ null
error: value is null while a list was expected, at (string):1:1
nix-repl> null ++ []
error: value is null while a list was expected, at (string):1:1
2019-06-25 20:23:50 +02:00
Silvan Mosberger
90f6a61a84
Fix nixUri source span
...
Previously it would include the spacing after the URI in the source
span.
2019-05-13 07:34:54 -07:00
Félix Baylac-Jacqué
cacbfdbd6d
Builtins: add builtins.concatMap
...
Fixes #448
2019-04-01 15:45:27 -07:00
Félix Baylac-Jacqué
3acc67ba66
Fix eval-okay-builtins-add.
...
Nix omits the trailing .0 when displaying a Float. Aligning current
hnix pretty printer with this behaviour.
Fixes #447 .
2019-03-27 21:16:54 -07:00
John Wiegley
4607639774
Remove the NValueNF type, as it provides little utility
2019-03-27 21:16:01 -07:00
John Wiegley
3d89159ee4
Remove an old comment
2019-03-23 12:53:10 -07:00
John Wiegley
04cf8be650
Move StdIdT out of the StandardT transformer
2019-03-23 00:56:40 -07:00
John Wiegley
db5cfa3185
Normalize the order of some arguments
2019-03-23 00:50:17 -07:00
John Wiegley
9e22c63bd5
Simplify Standard.hs further by creating Nix.Utils.Fix1
2019-03-23 00:49:03 -07:00
John Wiegley
77c52fd43c
Revise Nix.Standard
2019-03-23 00:49:03 -07:00
John Wiegley
47143fda73
Add an 'inform' method to MonadValue
2019-03-19 13:10:35 -07:00
Shea Levy
e4b5e557e9
Bring up-to-date with hnix-store-core 0.1.0.0.
2019-03-19 03:48:13 -04:00
John Wiegley
d1ada44817
Run brittany
2019-03-18 21:47:43 -07:00
John Wiegley
9b046a80c7
Remove unnecessary trailing space
2019-03-18 21:41:27 -07:00
John Wiegley
2a27f71a10
Resolve a compiler warning
2019-03-18 21:37:53 -07:00
John Wiegley
92ca9ff831
Restore rendering of Expectation frames
2019-03-18 21:34:04 -07:00
John Wiegley
39e42c9df7
All the tests now pass
2019-03-18 18:55:59 -07:00
John Wiegley
769a40e643
Down to 3 failures
2019-03-18 18:31:36 -07:00
John Wiegley
77d67b106c
8 test failures remaining
2019-03-18 18:20:07 -07:00
John Wiegley
2c0c896871
Everything compiling again, but 25 tests failing
2019-03-18 17:30:31 -07:00
Ryan Trinkle
9cc17a5c78
Fix all' issue in Builtins.hs
2019-03-18 19:27:04 -04:00
John Wiegley
bf4ecb6f08
Almost all of Builtins.hs ported
2019-03-18 15:40:15 -07:00
John Wiegley
df3e79d945
Port over most of Builtins.hs
2019-03-18 15:27:12 -07:00
John Wiegley
439ae6ce0d
More work toward harmonization; now down to porting Builtins
2019-03-18 14:01:48 -07:00
John Wiegley
be7b289b02
Add train and further methods for extending thunk actions
2019-03-18 12:51:29 -07:00
John Wiegley
522585a7f1
Begin work on harmonizing the two different value representations
2019-03-18 11:41:46 -07:00
John Wiegley
29c48fa8e3
Run Brittany again
2019-03-17 22:46:15 -07:00
John Wiegley
18c49f6a0d
Reorganize code in Nix.Value, creating new Nix.Value.Equal
2019-03-17 22:44:22 -07:00
John Wiegley
8553f7f4e9
Remove some commented out code
2019-03-17 22:00:15 -07:00
John Wiegley
a006769124
Factor some common patterns back into Standard
2019-03-17 21:58:35 -07:00
John Wiegley
7b5d134d22
Factor out FreshIdT from Standard
2019-03-17 19:04:38 -07:00
John Wiegley
015ced236e
Simplify Standard by splitting off Cited.Basic
2019-03-17 18:43:23 -07:00
John Wiegley
3881101ebd
Some very minor changes for consistency
2019-03-17 16:54:59 -07:00
John Wiegley
895f4e721f
Merge remote-tracking branch 'origin/vs-context-primops'
2019-03-17 15:44:05 -07:00
John Wiegley
1e2b67e488
Remove some unneeded comments
2019-03-17 15:31:27 -07:00
John Wiegley
aa66560bf7
Get rid of implicit conversions to and from thunks
2019-03-17 15:30:20 -07:00
John Wiegley
94e0be3882
Reformat all sources with Brittany, to restore consistency
2019-03-17 14:47:38 -07:00
John Wiegley
8cfb965e99
Restore the previous behavior of genericClosure
2019-03-17 14:18:57 -07:00
John Wiegley
88c81ceafe
Whitespace changes
2019-03-17 13:33:54 -07:00
John Wiegley
ad8b4a9257
Remove some unnused code
2019-03-16 23:42:48 -07:00
John Wiegley
5c10be3e3b
More cleanup, get rid of the Eq and Ord instances for NValue'
...
They had dubious semantics anyway; there is now only valueEqM and valueNFEq.
2019-03-16 23:35:16 -07:00
John Wiegley
1a6978fe6b
Change NValueNF so that the Pure case preserves the looped thunk
2019-03-16 23:13:13 -07:00
John Wiegley
954e201408
Add new synonym in Standard.hs: type StdIdT m = FreshIdT Int m
2019-03-16 16:24:44 -07:00
John Wiegley
492a3ae0bc
Factor out thunk id representation into its own class, MonadThunkId
2019-03-16 16:23:40 -07:00
John Wiegley
fcddfab5a0
Add a documentation note for 'thunkId'
2019-03-16 14:49:48 -07:00
John Wiegley
9405074cd8
Fix hnix-tests
2019-03-16 14:41:25 -07:00
John Wiegley
676994ed82
Have forceEff pretend to return a value again
2019-03-16 13:23:38 -07:00
John Wiegley
3c2393e5af
Add sequenceNValueNF
2019-03-16 13:16:45 -07:00
John Wiegley
4387024935
Fix MonadThunk in Standard.hs
2019-03-16 12:58:33 -07:00
John Wiegley
537f1fc8c7
Finish out the instance definitions in Standard.hs
2019-03-16 12:48:07 -07:00
John Wiegley
3c2801cbc7
More minor cleanup, add a new README-design.md
2019-03-16 11:41:48 -07:00
John Wiegley
6ae5764221
All type checks, but many instance definitions are still missing
2019-03-16 01:10:47 -07:00
John Wiegley
145e69c9a4
Further work on Standard.hs
2019-03-15 22:54:29 -07:00
John Wiegley
209a9ae9a5
Create Nix/Thunk/Standard.hs
2019-03-15 17:59:38 -07:00
John Wiegley
e9236aa55c
Now down to Main.hs and the tests
2019-03-15 17:20:10 -07:00
John Wiegley
c9f4e40ec0
Get most of Builtins.hs type checking again
2019-03-15 14:33:03 -07:00
John Wiegley
483dded8db
Begin work in Builtins.hs
2019-03-15 13:27:11 -07:00
John Wiegley
568fe7f825
Fix XML.hs
2019-03-15 13:20:47 -07:00
John Wiegley
488d8b2d89
Fix Json.hs and Frame.hs; now on to XML.hs
2019-03-15 12:59:13 -07:00
John Wiegley
85f32da4a4
Change signature of forceEff
2019-03-15 12:49:16 -07:00
John Wiegley
14b2b9a66d
Exec.hs now type checks, but we haven't restored thunking
2019-03-15 12:38:59 -07:00
John Wiegley
5d9c858f5d
More work toward getting Exec.hs to compile
2019-03-14 23:18:16 -07:00
John Wiegley
996266bbdc
More work in Exec.hs
2019-03-14 22:00:23 -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
ba33d8c117
Further revision in Value.hs
2019-03-14 10:40:30 -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
67bc3f2a69
Hopefully finished up with Value.hs and Normal.hs
2019-03-13 10:53:58 -07:00
John Wiegley
505591515f
More work on Value.hs
2019-03-12 23:44:42 -07:00
John Wiegley
28a1410013
Split off NCited into its own file
2019-03-12 07:21:24 -07:00
John Wiegley
3cb9834792
Begin abstracting the thunk/value data representation
2019-03-11 22:41:56 -07:00
John Wiegley
107f29d3fd
Move certain constraints from MonadThunk to the BasicThunk instance
2019-03-11 13:55:40 -07:00
John Wiegley
2e2ee3589c
Mix-in provenance information as a functoral layer, rather than directly
...
This changes nothing about how the code is structured just yet, but paves the
way for fully generalizing this up to the point where the thunk/value
representation is chosen. By making information like this functoral, we allow
full re-use of the NThunk/NValue machinery.
2019-03-11 08:44:22 -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
John Wiegley
bda79c984b
Merge branch 'master' into vs-context-primops
2019-03-11 08:41:42 -07:00
John Wiegley
f397b80a9c
Factor out citation information to its own data structure
2019-03-10 16:07:13 -07:00
Emmanuel Denloye-Ito
af9f69d517
fromJSON tests are now working. Yeah!
2019-03-10 14:14:14 -07:00
John Wiegley
5884b3ab11
Correct to source position rendering
2019-03-10 14:12:40 -07:00
John Wiegley
41d44b018c
Guard against infinitely recursive function calls
...
Fixes #432
2019-03-10 14:11:03 -07:00
John Wiegley
7bb233cb2b
Merge branch 'master' into vs-context-primops
2019-03-10 13:54:43 -07:00
Ken Micklas
765b2f9cfc
Return string instead of context in appendContext
2019-03-10 16:41:00 -04:00
Ken Micklas
9ce7d7ebe2
Add fromNixLikeContext
2019-03-10 16:40:51 -04:00
Ken Micklas
45400aae58
Allow missing keys in appendContext
2019-03-10 16:21:31 -04:00
Ken Micklas
37758c6190
Omit empty keys for NixLikeContextValues
2019-03-10 15:59:41 -04:00
Ken Micklas
37152002b0
Implement appendContext
2019-03-10 15:45:53 -04:00
Emmanuel Denloye-Ito
c51d966d44
Add tests for mapAttrs and changed hackyMakeNixStringWithoutContext to principledMakeNixStringWithoutContext in Builtins.hs
2019-03-10 11:17:36 -07:00
Emmanuel Denloye-Ito
586f1de62d
Less than test ( #461 )
...
References issue #438
Co-authored-by: John Wiegley <johnw@newartisans.com>
2019-03-10 11:16:36 -07:00
John Wiegley
602b71c173
Render source line locations more attractively
2019-03-10 11:15:28 -07:00
Ken Micklas
22048ccc89
Clean up syntax in getContext
2019-03-10 14:09:29 -04:00
Ken Micklas
718c94e0bb
Merge branch 'master' into vs-context-primops
2019-03-10 13:48:58 -04:00
John Wiegley
106fd7957f
Update to the latest hnix conventions
2019-03-10 10:41:31 -07:00
Madeline Haraj
28ab983408
Add syntactic holes
2019-03-10 10:23:28 -07:00
Emily Pillmore
f3970d49b9
Add principled 'fetchurl' + tests
...
Tests are masked until store work is done
2019-03-10 10:07:03 -07:00
John Ericson
5ddb79009d
Depend on hnix-store-core and use it for `printHash32`
2019-03-10 08:59:05 -07:00
John Wiegley
eae6bf542f
Split MonadFreshId off into its own file
2019-03-10 08:58:27 -07:00
Ken Micklas
75fb76a7c0
Revert "Add all the effects instances for FreshIdT"
...
This reverts commit 46db352af8
.
2019-03-09 22:03:30 -05:00
Ken Micklas
ec62bce3a0
Fix pointer equality case in thunkEq
2019-03-09 21:57:38 -05:00
Ken Micklas
695dd58d3c
Fix failable pattern in fresh
2019-03-09 21:40:59 -05:00
Ken Micklas
2366aff91d
Use valueEq when not pointer equal
2019-03-09 20:49:25 -05:00
Ken Micklas
8ddbe165e6
Only short-circuit pointer equality for correct types
2019-03-09 20:40:12 -05:00
Ken Micklas
05fccda825
Revert "Use thunk ID to short-circuit thunkEq"
...
This reverts commit c287ab8b59
.
2019-03-09 20:35:39 -05:00
Ken Micklas
6a5718458d
Fix MonadFreshId instances in wrong places
2019-03-09 20:26:56 -05:00
Ken Micklas
46db352af8
Add all the effects instances for FreshIdT
2019-03-09 20:26:56 -05:00
Ken Micklas
c287ab8b59
Use thunk ID to short-circuit thunkEq
2019-03-09 20:26:19 -05:00
Ken Micklas
d9293cf034
Fix Nix.Exec
2019-03-09 20:26:19 -05:00
Ken Micklas
91d5be6e49
Fix Nix.Lint
2019-03-09 20:26:19 -05:00
Ken Micklas
3b4af6f781
Move MonadAtomicRef ST instance to Nix.Thunk
2019-03-09 20:26:19 -05:00
Ken Micklas
ae09c47b7d
Fix Nix.Type.Infer
2019-03-09 20:26:19 -05:00
Ken Micklas
842dadf6da
Use non-standalone GND for FreshIdT
2019-03-09 20:26:19 -05:00
Ken Micklas
69fa8884c1
Add MonadAtomicRef instance for ST
2019-03-09 20:26:19 -05:00
Ken Micklas
a1fd246d01
Add MonadFix instance for FreshIdT
2019-03-09 20:26:19 -05:00
Ken Micklas
fd63be4f96
Add MonadFreshId instance for FreshIdT
2019-03-09 20:26:19 -05:00
Ken Micklas
3671e6993e
Fix FreshIdT instances
2019-03-09 20:26:19 -05:00
John Ericson
1abe4064c6
WIP more instances
2019-03-09 20:26:19 -05:00
John Ericson
3b5649c0a2
WIP fix equality
2019-03-09 20:26:19 -05:00
Vaibhav Sagar
4b8dff9aa8
Nix.Builtins: add getContext and appendContext primops
2019-03-09 19:30:56 -05:00
John Wiegley
a6d753bbdd
Remove an unnecessary import
2019-03-09 16:00:30 -08:00
Ryan Trinkle
a2b77f1d8a
Merge branch 'master' into ryantrinkle/splitVersion
2019-03-09 18:36:24 -05:00
Ryan Trinkle
883505f062
Merge branch 'master' into ryantrinkle/argsList
2019-03-09 18:34:19 -05:00
Ryan Trinkle
ae463c83e8
Merge branch 'master' into ryantrinkle/ellipsisBinds
2019-03-09 18:02:22 -05:00
Ryan Trinkle
d8a66c09ab
Ellipsis shouldn't introduce anything into scope
2019-03-09 17:59:59 -05:00
John Wiegley
3b2593df47
Merge branch 'master' into ryantrinkle/splitVersion
2019-03-09 14:51:39 -08:00
John Wiegley
92c0f5a307
Merge branch 'master' into ryantrinkle/argsList
2019-03-09 14:51:21 -08:00
Ryan Trinkle
b95710470c
When converting to JSON, if NVSet has an "outPath" attribute, use that instead of converting the object's attributes
2019-03-09 16:06:54 -05:00
Ryan Trinkle
bd867a3bef
When forming derivationStrict arguments, supply `args` as a list rather than a string
...
Perhaps this used to be different, but as of nix-instantiate 2.1.3, `args` may not be a string
2019-03-09 16:04:41 -05:00
Ryan Trinkle
4e9ec1a964
Improve error message in case `read` fails in splitVersion
2019-03-09 15:55:31 -05:00
John Wiegley
07e6a5a381
Merge branch 'pending'
2019-03-09 11:39:19 -08:00
Doug Beardsley
aa4156c5f6
Add test for currentSystem and remove hacky call
2019-03-08 23:22:43 -05:00
John Wiegley
624ec11234
Begin adding very basic source line printing
2019-03-03 14:48:49 -08:00
John Wiegley
3216a7f4ce
Create a stand-in function for pretty source location info
2019-01-08 11:00:09 -08:00
John Wiegley
b6dfaa22e9
Resolve a compile-time warning
2019-01-08 10:24:40 -08:00
Ken Micklas
4f61c4f3e7
Use extractNixString for JSON string
2018-12-14 12:04:20 -05:00
Ken Micklas
ad0d2d2bf8
Use WithStringContext(T) for nvalueToJSON
2018-12-13 16:59:51 -05:00
Ken Micklas
824615aabe
Merge branch 'master' into xml-string-context
2018-12-10 15:48:29 -05:00
Doug Beardsley
7d2f9d874a
Move json code into separate module
2018-12-09 13:57:58 -05:00
Ken Micklas
b1d48c5364
Accumulate string context in builtins.toXML
2018-12-06 18:11:06 -05:00
Ken Micklas
dcbde8c2d5
Add WithStringContext
2018-12-06 18:11:06 -05:00
Doug Beardsley
38147f81a9
Fix toJSON context handling and add test case
2018-12-05 14:59:42 -05:00
Doug Beardsley
5c6b1ff285
Fix replaceStrings and add test case to catch mistake
2018-12-05 11:53:59 -05:00