Richard Marko
06edd4b8cf
builtins.nixVersion: version 2.0 -> 2.3
...
Nixpkgs now has minimum required version 2.2, this allows us to
import it again.
2020-07-11 19:18:07 +03:00
Simon Jakobi
b4e3b3b2f4
Improve the documentation in Nix.{Atoms,Expr.Types} ( #662 )
...
This also removes some commented out TH from the haddocks
2020-07-03 01:35:30 +02: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
Simon Jakobi
f0532b86f6
Silence redundant import warnings for Control.Monad.Fail ( #633 )
...
Also address mysterious redundant import warnings in the testsuite
This allows us to enable `buildStrictly=true` for GHC 8.8.
Fixes #613 .
2020-06-19 02:21:06 +02:00
Anton-Latukha
8ebb26f371
src/Nix/Type/Infer.hs: clean-up imports
...
M src/Nix/Type/Infer.hs
2020-06-03 02:37:39 +03:00
Anton-Latukha
b72bfe86c9
src/Nix/Builtins.hs: clean-up imports
...
M src/Nix/Builtins.hs
2020-06-03 02:37:39 +03:00
Anton-Latukha
20667e55c6
src/Nix/Parser.hs: clean-up imports
...
M src/Nix/Parser.hs
2020-06-03 02:37:39 +03:00
Anton-Latukha
48f1dbb13a
clean-up Monad.Trans imports
...
M src/Nix/Exec.hs
M src/Nix/Reduce.hs
2020-06-03 02:37:39 +03:00
Anton-Latukha
76ab909958
clean-up Monoid imports
...
M main/Repl.hs
M src/Nix/Expr/Strings.hs
M src/Nix/Utils.hs
2020-06-02 02:11:50 +03:00
Anton-Latukha
83c483d160
src/Nix/Value.hs: clean-up imports, clen-up GHC warning
...
M src/Nix/Value.hs
2020-06-02 01:38:39 +03:00
Simon Jakobi
9c6003ae8b
Use haskeline-0.8 ( #540 )
...
The `MonadException` class was removed in favor of `MonadCatch`, so we
can remove its instances, enabling us to remove the library dependency
on haskeline.
To simplify dependency resolution with GHC < 8.10, this also disables
the executable in that configuration.
2020-05-30 03:32:20 +02:00
Simon Jakobi
707060260a
Clean up hashing-related dependencies ( #597 )
...
Background: https://github.com/haskell-nix/hnix/issues/588#issuecomment-634692400
2020-05-30 02:28:50 +02:00
Simon Jakobi
a2b9980e2c
Fix build failure in Nix.Var ( #587 )
...
The `Refl` constructor had previously been re-exported from
`Data.GADT.Compare`.
This also replaces the dependency on `dependent-sum` with `some`,
where the `Data.GADT.Compare` module is now defined.
Tested by building locally with GHC 8.4.4, 8.6.5 and 8.8.3 in `cabal`.
Fixes #585 .
2020-05-25 20:28:26 +03:00
Richard Marko
192202d939
remove leftover Poly README
2020-05-15 17:51:58 -07:00
Richard Marko
c61abbe6c0
pretty derivation builtin nix
2020-05-15 17:50:21 -07:00
Richard Marko
f2999a33bb
simplify evalExpression
2020-05-15 17:49:36 -07:00
Silvan Mosberger
f682907c97
Make URI's be separate from strings
2020-05-15 17:49:11 -07:00
John Wiegley
9d63f952e9
Merge remote-tracking branch 'sjakobi/ghc-gte-8.4'
2020-01-13 18:13:37 -08:00
John Wiegley
71804374ce
Merge remote-tracking branch 'quasi/monadfail'
2020-01-13 17:56:33 -08: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
45c72cd20e
fixup: undo spurious space change
2019-11-26 14:32:29 -07: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
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
Simon Jakobi
5c8c1cc16f
We unconditionally depend on deepseq >= 1.4.3 now
2019-10-22 00:18:12 +02:00
Simon Jakobi
ff39add9af
Remove instance for old binary versions
2019-10-22 00:05:52 +02:00
Simon Jakobi
5f4cef9922
We unconditionally have hashable >= 1.2.5 now
2019-10-22 00:03:52 +02:00
Simon Jakobi
4cd94bf687
Remove some redundant GHC version checks
2019-10-21 23:52:22 +02:00
Simon Jakobi
8ed7d765dd
Require base >= 4.11
...
There were multiple build failures with GHC-8.2 due
to (<>) and Semigroup not being in scope.
2019-10-21 23:46:35 +02:00
quasicomputational
37c2bb25da
Adapt to MonadFail changes in GHC 8.8.
...
Note that this is an enforced public API change.
I went with changing the `MonadFile` typeclass rather than threading
through a `MonadFail` at every use-site, but that would be possible as
well if it makes more semantic sense - however, since `MonadFile`
already seems to require an IO-ish implementation, adding that
superclass doesn't seem like an imposition.
2019-10-02 08:04:17 +01:00
quasicomputational
91262e7602
Allow most recent versions of dependencies.
...
The only actual breaking change affecting `hnix` is `these` splitting
into three packages and renaming some things. Otherwise, as the
package should work fine with either the newer or older versions, I
have left the previous bounds in place and added the new ones
disjunctively.
This will help somewhat with #494 .
2019-09-06 13:19:14 -07:00
Anton-Latukha
c03a40acea
upd texts of more messages
...
Heterogeneous: consisting of dissimilar elements.
Heterogenous:
1. not originating within the body;
(ex: "You are NOT of the body!" by Dr. Leonard "Bones" McCoy)
2. of foreign origin;
3. heterogeneous.
2019-08-04 15:00:57 -07:00
Anton-Latukha
e3f5eafd7b
upd texts of messages
2019-08-04 12:52:22 -07:00
Anton-Latukha
4758c014e5
Thunk: Basic: LANGUAGE: rm {LambdaCase,TypeApplications}
2019-08-04 09:14:41 -07:00
Anton-Latukha
63b4496621
Standard: LANGUAGE: rm {LambdaCase,TupleSections,ViewPatterns}
2019-08-04 09:14:41 -07:00
Anton-Latukha
dda464a8ec
Render: LANGUAGE: rm TypeApplications
2019-08-04 09:14:41 -07:00
Anton-Latukha
150c1086a3
Pretty: LANGUAGE: rm TupleSectioning
2019-08-04 09:14:41 -07:00
Anton-Latukha
e50a2272b3
Lint: LANGUAGE: rm StandaloneDeriving
2019-08-04 09:14:41 -07:00
Anton-Latukha
9baacd3b2d
Fresh: LANGUAGE: rm {DefaultSignatures,FunctionalDependencies}
2019-08-04 09:14:41 -07:00
Anton-Latukha
34af384870
Var: LANGUAGE: rm Derive{Foldable,Functor,Traversable}
2019-08-04 09:14:41 -07:00
Anton-Latukha
f258d00796
Exec: LANGUAGE: rm {DeriveFunctor,GeneralizedNewtypeDeriving,ViewPatterns}
2019-08-04 09:14:41 -07:00
Anton-Latukha
61dfbca2e3
Eval: LANGUAGE: rm FunctionalDependencies
2019-08-04 09:14:41 -07:00
Anton-Latukha
63f3f9f5cd
Convert: LANGUAGE: rm DefaultSignatures
2019-08-04 09:14:41 -07:00
Anton-Latukha
6f06152976
Value: Monad: LANGUAGE: rm FunctionalDependencies
2019-08-04 09:14:41 -07:00
Silvan Mosberger
82b2d8af7f
Use NSet for both recursive and non-recursive sets
...
Simplifies the AST
2019-07-25 14:10:44 -07:00
Anton-Latukha
4f7013bc1f
Effects: Basic: upd simplify defaultImportPath ErrorCall
2019-06-25 20:24:12 +02:00
Anton-Latukha
dbe17f0065
Effects: Basic: LANGUAGE: rm unused ConstraintKinds
2019-06-25 20:24:12 +02:00
Anton-Latukha
dfe144a0e0
Effects: Basic: LANGUAGE: rm unused FlexibleInstances
2019-06-25 20:24:12 +02:00
Anton-Latukha
0505d160a7
Effects: Basic: LANGUAGE: rm unused MultiParamTypeClasses
2019-06-25 20:24:12 +02:00
Anton-Latukha
97dd1dc376
Effects: Basic: LANGUAGE: rm unused MultiWayIf
2019-06-25 20:24:12 +02:00
Anton-Latukha
e6718a0afd
Effects: Basic: LANGUAGE: rm unused PartialTypeSignatures
2019-06-25 20:24:12 +02:00
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