Anton-Latukha
10051fbfc1
clean-up: rm commented-out imports
...
M main/Main.hs
M src/Nix/Reduce.hs
M src/Nix/Type/Infer.hs
M tests/EvalTests.hs
2020-09-21 01:57:58 +03:00
Anton-Latukha
0cb3946ee7
clean-up: (return -> pure)
...
M main/Main.hs
M main/Repl.hs
M src/Nix/Builtins.hs
M src/Nix/Convert.hs
M src/Nix/Effects.hs
M src/Nix/Effects/Basic.hs
M src/Nix/Eval.hs
M src/Nix/Exec.hs
M src/Nix/Expr/Types.hs
M src/Nix/Json.hs
M src/Nix/Lint.hs
M src/Nix/Normal.hs
M src/Nix/Options/Parser.hs
M src/Nix/Parser.hs
M src/Nix/Scope.hs
M src/Nix/String.hs
M src/Nix/TH.hs
M src/Nix/Thunk/Basic.hs
M src/Nix/Utils.hs
M src/Nix/Value.hs
M src/Nix/Value/Equal.hs
M src/Nix/XML.hs
M tests/EvalTests.hs
M tests/Main.hs
M tests/NixLanguageTests.hs
M tests/ParserTests.hs
M tests/TestCommon.hs
2020-09-21 01:57:52 +03:00
Simon Jakobi
220209c090
Use neat-interpolation instead of interpolate ( #635 )
...
In addition to `interpolate`, this also removes the following
transitive dependencies:
- `haskell-src-exts`
- `haskell-src-meta`
- `safe`
- `th-expand-syns`
- `th-lift`
- `th-lift-instances`
- `th-orphans`
- `th-reify-many`
Since `neat-interpolation`'s `text` quasiquoter trims more whitespace
than `interpolate`'s `i`, the expected output of some tests for
`unsafeGetAttrPos` had to be updated.
This also improves the test failure output of the `constantEqual`
helper.
Fixes #634 .
2020-06-27 10:43:50 +02:00
Guillaume Maudoux
975d6dea93
Refactor execBinaryOp to demand values where needed.
...
This spliste execBinaryOp in two parts where the second conatains all
the logic that relies on the assumption that values are already in
"demanded".
2019-11-27 17:16:43 -08:00
Guillaume Maudoux
21c3c9c938
Fix compound attributes in let bindings
...
Fix an issue where compound attributes would discard previous bindings
in a let statement.
`let a=1; b.b=2; c=3; in a` would fail, where
`let a=1; b.b=2; c=3; in c` would work as expected.
2019-11-25 15:22:39 -07:00
John Wiegley
4607639774
Remove the NValueNF type, as it provides little utility
2019-03-27 21:16:01 -07:00
John Wiegley
77c52fd43c
Revise Nix.Standard
2019-03-23 00:49:03 -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
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
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
9405074cd8
Fix hnix-tests
2019-03-16 14:41:25 -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
dc12cdf92e
Add a test to ensure that we report infinite recursion
2019-03-10 14:19:15 -07:00
hsloan
f2033c0694
change test directory
2019-03-10 11:38:41 -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
Ken Micklas
4895255155
Fix syntax error in test
2019-03-09 20:40:30 -05:00
John Ericson
3b5649c0a2
WIP fix equality
2019-03-09 20:26:19 -05:00
John Wiegley
e8a6fbab16
Merge branch 'master' into fix/freeVars
2018-11-22 09:49:22 -08:00
Patrick Hilhorst
717368c4f9
Missed renaming freeVarsEqual at the call site
2018-11-20 04:40:09 +01:00
Patrick Hilhorst
2a5df57fd0
Fix for Set import
...
Co-Authored-By: Infinisil <infinisil@icloud.com>
2018-11-18 22:02:16 +01:00
Patrick Hilhorst
d7f0ef3433
Add regression test for #373
2018-11-18 16:12:52 +01:00
Ken Micklas
ec03b08d5b
Add tests for null and empty string comparison
2018-11-17 16:19:18 -05:00
gb
a57aa711df
tests run
2018-09-09 11:47:04 -04:00
gb
2fadbe3090
add new nixstring version with warnings
2018-09-09 11:01:09 -04:00
John Wiegley
833851392d
Merge remote-tracking branch 'origin/master' into pending
2018-09-07 13:16:28 -07:00
John Wiegley
ee8b79c176
Add an evaluation test concerning the strictness of with lookups
2018-09-07 13:14:50 -07:00
Jude Taylor
04d744bcae
fix eval test
2018-09-04 16:45:45 -07:00
John Wiegley
61cc26abf6
Merge pull request #349 from obsidiansystems/master
...
Fix function equals test
2018-09-03 10:03:50 -07:00
John Wiegley
638c67bf3d
Merge branch 'master' into master
2018-09-02 19:15:16 -07:00
John Wiegley
ed99b7ad18
Merge branch 'master' into mapattrs
2018-09-02 19:15:04 -07:00
Jörg Thalheim
c890965bb4
add builtins.{bitAnd,bitOr,bitXor)
2018-08-20 17:04:55 -05:00
Matthew Bauer
10fe907c50
Add builtins.mapAttrs
...
Fixes #341
2018-08-09 18:23:13 -04:00
Matthew Bauer
ecc8d716ef
Fix function equals test
...
I still don’t understand what Nix is doing behind the scenes here.
This is the original test case. Apparently it only happens with let
bindings?
Fixes #340
2018-08-09 16:21:02 -04:00
John Wiegley
c3e3e27ee3
Merge remote-tracking branch 'origin/master' into pending
2018-08-05 12:20:24 -04:00
Daniel Krol
d7544f5c0d
Adding tests for __overrides
...
* `__overrides` key isn't sticking around in the resultant attribute sets
* `inherit __overrides` blows up altogether (whereas it doesn't in nix)
2018-08-05 11:53:33 -04:00
John Wiegley
842634971e
Comment out two eval tests, to be addressed by issue #340
2018-08-05 10:53:32 -04:00
John Wiegley
7cc206a278
ALL_TESTS should also imply MATCHING_TESTS
2018-08-05 10:48:47 -04:00
John Wiegley
bf8d9c177e
Add a rec set test when using pathed names
2018-08-05 10:42:55 -04:00
Jude Taylor
b42a6e1cfd
Catch InappropriateType error in pathExists
2018-08-01 20:09:26 -07:00
gb
9c3e5e995c
update fork from master contd
2018-07-28 14:17:37 -04:00
gb
ea3b675f28
update fork from master
2018-07-28 13:23:23 -04:00
Matthew Bauer
39100fa19e
Fix Nixpkgs evaluation on Functions
...
Nix says that { f = x: x; } == { g = y: y; }. The rule says to ignore
functions when comparing attribute sets or lists. This commit follows
this rule. However, it is still true that:
(x: x) /= (y: y)
I have also added some tests that check for these cases.
Fixes #323
2018-07-25 21:00:16 -04:00
Félix Baylac-Jacqué
d3cbcf791c
Builtins.div cannot divide by 0
...
Fixes #277 .
2018-06-12 21:54:28 +02:00
Dmitry Rets
1d300ca70f
Add tests for __findFile.
2018-05-21 00:29:42 +02:00
John Wiegley
d805fa3627
Preserve attr name positions in attrSetAlter
2018-05-10 00:09:42 -07:00
John Wiegley
31f3dc0766
Desugar NSet binds as well as NRecSet, remove an always True parameter
...
Fixes #310
2018-05-09 15:03:11 -07:00
John Wiegley
37893b3522
Add a presently commented out test, to be restored when #310 is fixed
2018-05-09 14:42:21 -07:00
John Wiegley
d191a7587d
Add test case_unsafegetattrpos
2018-05-09 01:43:33 -07:00
John Wiegley
a03cf78ce2
Use nix-instantiate --eval --strict for comparison tests
2018-05-09 01:39:29 -07:00