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

coercion to NixString; iterNValue': flip 1st arg; unflip runFreshIdT #1005

Merged
merged 34 commits into from
Nov 5, 2021

Conversation

Anton-Latukha
Copy link
Collaborator

@Anton-Latukha Anton-Latukha commented Nov 5, 2021

This PR is interesting in Utils & Value where things were updated to fixpoint combinators.

Which, if internally laziness is preserved - running the function & apply the argument to it only once & optimize during compilation.

In Haskell Core I found that fix sometimes roughly converts just to let x = f x in x (stays a basic let, letrec in terms of Core language).

So far I can not reason beyond Core, it is hard to say how letrec compiles.

This is a work I did before the Nix 2.4 release, which broke the CI on all fronts. I decided to not run putting created by upstream fires. Decided to not overcomplicate the Git processes for myself, so decided to finish & contribute the work first & then go do fix things.

Now there are no uses of `coerceToString` in the codebase.
As deleted WTF note states - the set processing was in the "Stringy" block.
Decomposition shown the proper place and tied togather mutual recursion in the
case of a set.
Not needed as functions internally already do it.
`M` suffix for it, as there is `nest` without monad.
M  src/Nix/Value.hs
Code points out it clearly.

Additionally, if people are accustomed to Reader monad & runReader - keep it
that way.
@Anton-Latukha Anton-Latukha force-pushed the 2021-10-31-upd-coerceToNixString branch from 8819a0d to 2a38563 Compare November 5, 2021 18:14
@Anton-Latukha Anton-Latukha changed the title coercion to NixString, iterNValue': flip 1st arg, unflip runFreshIdT coercion to NixString; iterNValue': flip 1st arg; unflip runFreshIdT Nov 5, 2021
@Anton-Latukha Anton-Latukha merged commit 5dc09e9 into master Nov 5, 2021
@Anton-Latukha Anton-Latukha deleted the 2021-10-31-upd-coerceToNixString branch November 5, 2021 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant