Commit graph

747 commits

Author SHA1 Message Date
Joe Hermaszewski 4202bac068 Remove Generic1 instance for NKeyName
See https://github.com/haskell-nix/hnix/issues/225
2020-10-26 18:57:17 -07:00
Anton-Latukha 003dcb660b
clean-up: m upd: minor tweaks, dropped functor 2020-09-21 01:58:00 +03:00
Anton-Latukha 6fa53d711b
clean-up: Utils.hs: m upd doc 2020-09-21 01:58:00 +03:00
Anton-Latukha 523edca13c
clean-up: {Pretty,Utils,Utils/Fix1}.hs: imports 2020-09-21 01:58:00 +03:00
Anton-Latukha cbeae8cfa1
clean-up: rm pragmas in {Reduce, Utils/Fix1}.hs 2020-09-21 01:58:00 +03:00
Anton-Latukha 84e1d7fc17
clean-up: m upd 2020-09-21 01:58:00 +03:00
Anton-Latukha 0f3eab3aef
clean-up: Pretty.hs: rm Nix.Util as not used 2020-09-21 01:58:00 +03:00
Anton-Latukha fde6764713
clean-up: Pretty.hs: <$>: .Comonad == .Prelude; no <$> in Nix.Utils 2020-09-21 01:57:59 +03:00
Anton-Latukha 64726d71e7
clean-up: Expr/Types.hs: NExprF: upd doc 2020-09-21 01:57:59 +03:00
Anton-Latukha 9fdf471f2b
clean-up: Value.hs: m upd doc 2020-09-21 01:57:59 +03:00
Anton-Latukha c01e156fef
clean-up: Builtins.hs: nixPath: simplify parens 2020-09-21 01:57:59 +03:00
Anton-Latukha 55b0040384
clean-up: Nix/Value.hs: NValueF: fx doc
Also what 's' is referenced here?
2020-09-21 01:57:59 +03:00
Anton-Latukha eb8c2252cb
clean-up: Nix.hs: evaluateExpression: use Kleisli composition 2020-09-21 01:57:59 +03:00
Anton-Latukha b035e373d6
clean-up: m
M  src/Nix/Effects.hs
2020-09-21 01:57:58 +03:00
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
Anton-Latukha dd6940fe7b
clean-up: Nix/Builtins.hs: case to maybe 2020-09-18 18:43:59 +03:00
Anton-Latukha 23b143478b
Nix/Convert.hs: fuse functors in one case of fromValueMay
fmap (fmap (, p)) $ fmap (sequence) $ traverse fromValueMay s
fmap (fmap (, p)) . fmap (sequence) $ traverse fromValueMay s
| (fmap f . fmap g) => fmap (f . g)
fmap (fmap (, p) . (sequence)) $ traverse fromValueMay s
| fmap => <$>
fmap (, p) . sequence <$> $ traverse fromValueMay s
2020-09-18 18:43:59 +03:00
Anton-Latukha 85a098bfd5
clean-up: Nix/Convert.hs 2020-09-18 18:43:59 +03:00
Anton-Latukha 4b44d97d9b
clean-up: Nix/Convert.hs: use tuple sectioning 2020-09-18 18:43:59 +03:00
Anton-Latukha c3f4d72dfd
clean-up: parens
M  main/Repl.hs
M  src/Nix/Builtins.hs
M  src/Nix/Cited.hs
M  src/Nix/Exec.hs
M  src/Nix/Expr/Types/Annotated.hs
M  src/Nix/Pretty.hs
2020-09-18 15:58:28 +03:00
Anton-Latukha ffc82fc97e
clean-up: LANGUAGE pragmas
M  Setup.hs
M  main/Repl.hs
M  src/Nix/Builtins.hs
M  src/Nix/Cache.hs
M  src/Nix/Cited.hs
M  src/Nix/Cited/Basic.hs
M  src/Nix/Convert.hs
M  src/Nix/Exec.hs
M  src/Nix/Expr/Types.hs
M  src/Nix/Expr/Types/Annotated.hs
M  src/Nix/Lint.hs
M  src/Nix/Normal.hs
M  src/Nix/Pretty.hs
M  src/Nix/Render/Frame.hs
M  src/Nix/Scope.hs
M  src/Nix/TH.hs
M  src/Nix/Thunk.hs
M  src/Nix/Thunk/Basic.hs
M  src/Nix/Utils.hs
M  src/Nix/Value.hs
M  src/Nix/Value/Equal.hs
2020-09-14 20:54:37 +03:00
Simon Jakobi dfa0435e9e Fix since annotation 2020-09-13 19:13:08 +03:00
Anton Latukha 1beaf46cd3
Options/Parser: debugVersionOpt: comment: add nix-build note (#717)
[Remark](https://github.com/haskell-nix/hnix/pull/712#issuecomment-691654639) deserves a comment note in the source code.
2020-09-13 14:10:27 +03:00
Anton Latukha 83c5cea9a4
Options/Parser: add '--long-version' that adds debug information (#712)
Option for debugging and bugreporting purposes.

Current output:
```
Version: 0.9.1
Commit: 2dc211314e
  date: Sat Sep 12 13:31:59 2020 +0300
  branch: 2020-09-12-add-GitRev-to-version
```

Also date and branch is to direct contributors attention to updating (or having
in mind) that.

M  hnix.cabal
M  src/Nix/Options/Parser.hs
2020-09-13 13:51:14 +03:00
Simon Jakobi 775be0d234 Add Ord1 instances for Binding, NExprF, and NKeyName
With data-fix 0.3, these instances are required so an
Ord instance for NExpr can be inferred.
2020-09-13 12:47:24 +03:00
Anton-Latukha 2dc211314e src/Nix/Options/Parser.hs: m upd alignment 2020-09-12 13:31:59 +03:00
Anton-Latukha 38215317b9 src/Nix/Options/Parser.hs: add CLI option --version 2020-09-12 13:31:59 +03:00
Simon Jakobi 93ecf531c4 Remove overlapping [From,To]JSON instances for NExpr
…for compatibility with aeson-1.5.3.

Closes #690.
2020-08-19 15:22:33 -07:00
Simon Jakobi 1a2d627a58 Use prettyprinter-1.7.0
Changelog:
http://hackage.haskell.org/package/prettyprinter-1.7.0/changelog

hnix is likely to be affected by this change:

> Use floor instead of round to compute ribbon width.

…due to its use of custom `LayoutOptions`.
2020-08-07 12:21:12 +03:00
Simon Jakobi 54030284fa Update to data-fix-0.3
Changelog: http://hackage.haskell.org/package/data-fix-0.3.0/changelog

Context: https://github.com/commercialhaskell/stackage/issues/5535
2020-07-24 12:35:59 +03:00
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