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
4ded48a789
Add proper default 'nix' prefix to search paths
...
The search path of Nix contains by default the "nix" prefix that points
to $datadir/nix/corepkgs, where $datadir defaults to $prefix/lib at
installation time, but can be overriden by NIX_DATA_DIR.
We implemented it using `Paths.hnix.getDataDir` and `NIX_DATA_DIR` to
follow Nix behaviour as closely as possible.
A small discrepancy is that we do the lookup on each invocation, where
Nix caches the searchPath at context creation.
2019-11-26 14:32:29 -07:00
John Wiegley
77c52fd43c
Revise Nix.Standard
2019-03-23 00:49:03 -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
6ae5764221
All type checks, but many instance definitions are still missing
2019-03-16 01:10:47 -07:00
Domen Kožar
48fe67748b
Fix warnings
2018-11-25 10:08:17 +00:00
John Wiegley
2447e7e044
Remove the use of hpack
...
Fixes #411
2018-11-22 09:15:50 -08:00
gb
4baa4f7108
change Nix.NixString module to Nix.String
2018-09-23 16:03:44 -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
Félix Baylac-Jacqué
721ddd4f53
Test NSelect reduction
2018-06-25 17:19:39 +02:00
John Wiegley
dd3b5e4ac6
Disable the pretty parse tests entirely for now
2018-05-14 21:22:07 -07:00
John Wiegley
471712f11f
Switch PrettyPrintTests from QuickCheck to Hedgehog
...
The reason being that we get better shrinking by default, and no orphan
instances.
2018-05-14 21:22:04 -07:00
Profpatsch
9724c649ce
tests: add a shortcut env variable to run all tests
...
Instead of having to specify all env variables manually, this defaults to
running all tests.
2018-05-15 00:03:39 +02:00
Profpatsch
9cfe060a9d
tests: add HPACK_TESTS to make hnix tests conditional
...
Otherwise requires the `hpack` executable to be in scope, which cannot be
assumed (contrary to the `nix` executable).
2018-05-14 23:56:10 +02:00
gb
43c145252d
NixString is in its own module hiding the constructors
2018-05-08 16:47:50 -04:00
John Wiegley
6770046492
During testing, set the store to the current directory
2018-05-08 12:16:13 -07:00
John Wiegley
aab22fcc68
Set NIX_REMOTE for running the full language tests under Docker
2018-05-07 13:17:44 -07:00
John Wiegley
e35a78f067
Always enable the Nix language tests
2018-05-07 12:45:51 -07:00
John Wiegley
2457efdaa3
Only invoke pretty/parser tests if PRETTY_TESTS=<N> for some N>0
2018-05-06 22:13:30 -07:00
John Wiegley
ce35811f29
Resolve a build warning
2018-05-06 12:30:16 -07:00
John Wiegley
1a7ec43199
Disable PrettyParseTests for now
2018-05-06 11:14:53 -07:00
Matthew Pickering
b0ed29b3df
Add QuickCheck test for pretty printer and parser
...
I have not spent any time optimising the generated programs but they do
not look totally unreasonable from a cursory inspection.
Fixes #158
2018-05-06 10:31:52 +00:00
hsloan
c1561ea711
Implement builtins.currentTime
2018-05-02 21:32:00 -07:00
John Wiegley
dcba116c72
Correct a spelling mistake in the test runner
2018-04-30 21:48:45 -04:00
John Wiegley
dfcb48fce1
Restore verbose error reporting from Nix language tests
2018-04-28 15:30:44 -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
68d81dd57c
More work on provenance reporting
2018-04-24 23:09:43 -07:00
John Wiegley
2de8c7cf84
More fixes to error reporting
2018-04-24 12:25:40 -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
86b09103d6
Move production of a reduced test case to --reduce, improve --trace
2018-04-20 22:36:40 -07:00
John Wiegley
c3f34e62ce
Use verbosity to control how much is displayed in error messages
2018-04-17 17:25:59 -07:00
John Wiegley
eadf714036
If MATCHING_TESTS=yes (default for Travis), compare eval tests to Nix
2018-04-13 22:34:24 -07:00
John Wiegley
58b65d2ce1
Don't evaluate to normal form by default in the top level evaluators
2018-04-13 19:29:18 -07:00
John Wiegley
9a089712aa
Create new __includes builtin, set by --include/-I
2018-04-11 22:02:31 -07:00
John Wiegley
27c3875934
Use hnix to process nixpkgs in the tests
2018-04-11 13:56:31 -07:00
John Wiegley
481d6fa9c1
Don't ignore errors when parsing nixpkgs
2018-04-10 13:17:37 -07:00
Doug Beardsley
13fc5bcd6d
Add builtins.split
...
Finishes issue #113
2018-04-10 12:33:31 -07:00
John Wiegley
6d275b6093
Make Nixpkgs parsing test also optional (for now)
2018-04-10 11:14:20 -07:00
John Wiegley
586402ad9a
Add a test for parsing all of the nixpkgs that we build with
2018-04-10 11:05:22 -07:00
John Wiegley
954ffccebb
Ensure in the tests that hnix.cabal is not edited directly
2018-04-07 12:09:49 -07:00
John Wiegley
443129315d
Use hpack and move all the Nix sources into a src/ directory
2018-04-07 12:02:33 -07:00
John Wiegley
debd240d9d
Fix to data presence check
2018-04-04 16:36:15 -07:00
John Wiegley
815748d8ac
Update error reports from hnix-tests
2018-04-04 16:33:43 -07:00
Doug Beardsley
7281a0732d
Fix issue #133
2018-04-04 16:32:21 -06:00
John Wiegley
d77e52e9d4
Don't run the language tests (say, on Travis) unless LANGUAGE_TESTS=yes
2018-03-28 16:30:54 -07:00
John Wiegley
3a29249e43
Normalize import statements, add option parsing
2018-03-27 21:59:27 -07:00