Skip to content

Commit

Permalink
(#1046) Value: rm value makers, use bidirectional patterns
Browse files Browse the repository at this point in the history
Solves: #1045
  • Loading branch information
Anton-Latukha authored Jan 23, 2022
2 parents a9beaee + 3b2d3de commit 99508f2
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 243 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@

## [(diff)](https://github.com/haskell-nix/hnix/compare/0.16.0...0.17.0#files_bucket) 0.17.0

* Introduction:
* `Nix.Value`
* [(link)](https://github.com/haskell-nix/hnix/pull/1046/files) Constraint `NVConstraint f = (Comonad f, Applicative f)` was introduced, in order to unify builder `mkNV*` and `NV*` patterns.

* Breaking:
* `Nix.Expr.Types`
* [(link)](https://github.com/haskell-nix/hnix/pull/1042/files) The central HNix type `NExprF` changed, the `NApp` was moved out of `NBinary` & now a `NExprF` constructor of its own, the type signatures were changed accordingly.
* [(link)](https://github.com/haskell-nix/hnix/pull/1038/files) project was using `megaparsec` `{,Source}Pos` and to use it shipped a lot of orphan instances. To improve the situation & performance (reports [#1026](https://github.com/haskell-nix/hnix/issues/1026), [#746](https://github.com/haskell-nix/hnix/issues/746)) project uses `N{,Source}Pos` types, related type signatures were changed accordingly.
* `Nix.Value`
* [(link)](https://github.com/haskell-nix/hnix/pull/1046/files) Unify builder `mkNV*` and `NV*` patterns by bidirectional synonyms, a lot of builders `mkNV*` are removed, and merged to `NV*`. e.g. instead of builder `mkNVList`, `NVList` should be used.


## [(diff)](https://github.com/haskell-nix/hnix/compare/0.15.0...0.16.0#files_bucket) 0.16.0

Expand Down
2 changes: 1 addition & 1 deletion src/Nix.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ evaluateExpression mpath evaluator handler expr =
f' <- demand f
val <-
case f' of
NVClosure _ g -> g $ mkNVSet mempty $ M.fromList args
NVClosure _ g -> g $ NVSet mempty $ M.fromList args
_ -> pure f
processResult handler val
where
Expand Down
Loading

0 comments on commit 99508f2

Please sign in to comment.