Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify mkNV* and NV* patterns by bidirectional synonyms in value modules #1046

Merged
merged 13 commits into from
Jan 23, 2022
Merged
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.

Comment on lines +6 to +9
Copy link
Collaborator

@Anton-Latukha Anton-Latukha Jan 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would note that Breaking & Additional - generally enough. If it is not major (breaking) change - everything else is additional niceties information. First - is first aid network, second is a daily news network.

For example, this change does not belong into "Introduction", it can be thought to belong to Additional, but as it changes type signatures in a number of places - it is a Breaking change. As it adds Comonad or Applicative (literal declaration of having requirement for such type class instance existence when there was none before - is a breakage) somewhere when it was not before.

The first most important client type of ChangeLogs in Haskell projects - is downstream developers. & generally under the semantic agenda of supporting the update, people look into changelogs. So the most important and clear thing ChangeLog should do - is to have as many breaking changes described precisely as possible. That it is an introduction of something into the code - can be said in explanation of breaking changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally put it into breaking, but it comes to me that it is jut short hands for Comonad f, Applicative f.
An introduction of short hand for the new constraint requirements, I think it is both introduction and breaking, sort of dangling in the middle.

Since you remind me of the change logs focus is on breaking changes and reading experience of developers , move back to breaking does seem to make more sense. Thanks, surely will modify it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in #1048

* 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