Commit Graph

714 Commits

Author SHA1 Message Date
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