-
Notifications
You must be signed in to change notification settings - Fork 114
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
Migrating code to new demand implementation #873
Merged
Anton-Latukha
merged 5 commits into
master
from
2021-03-04-migrate-code-to-new-demand-implementation
Mar 5, 2021
Merged
Migrating code to new demand implementation #873
Anton-Latukha
merged 5 commits into
master
from
2021-03-04-migrate-code-to-new-demand-implementation
Mar 5, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Anton-Latukha
force-pushed
the
2021-03-04-migrate-code-to-new-demand-implementation
branch
from
March 5, 2021 08:25
38be796
to
80c3ec6
Compare
Anton-Latukha
force-pushed
the
2021-03-04-migrate-code-to-new-demand-implementation
branch
from
March 5, 2021 08:43
80c3ec6
to
de21598
Compare
Builtins, it is 44 uses. Other also. Some refactor in the process. Couple of monadic binds become functors. After this change the code allows more refactors - move `demand`s into `do` blocks and fold the `do` blocks.
Anton-Latukha
force-pushed
the
2021-03-04-migrate-code-to-new-demand-implementation
branch
2 times, most recently
from
March 5, 2021 09:30
4c5cead
to
22f320c
Compare
Anton-Latukha
force-pushed
the
2021-03-04-migrate-code-to-new-demand-implementation
branch
from
March 5, 2021 09:36
22f320c
to
0112b53
Compare
Anton-Latukha
deleted the
2021-03-04-migrate-code-to-new-demand-implementation
branch
March 5, 2021 09:57
layus
reviewed
Mar 5, 2021
@@ -351,7 +351,7 @@ buildDerivationWithContext drvAttrs = do | |||
-- common functions, lifted to WithStringContextT | |||
|
|||
demandF' :: (NValue t f m -> WithStringContextT m a) -> NValue t f m -> WithStringContextT m a | |||
demandF' f v = join $ lift $ demandF (pure . f) v | |||
demandF' f v = join $ lift $ f <$> demand v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: It seems that demand' -> demandF' was not reverted. For consistency it should probably also be flipped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builtins
are processed.do
blocks became 1.This almost fully closes the #850
What is further left there is basically to move Kleisli out of
inform
,informF
is for that, then do the includes of the function uses inside thedo
blocks and fold the lambdas, binds anddo
blocks further. With the current lispy sectioning, it is easy and semi-automatic.