Implements magic-do for Control.Monad.Effect#3289
Merged
kritzcreek merged 1 commit intopurescript:masterfrom Mar 27, 2018
Merged
Implements magic-do for Control.Monad.Effect#3289kritzcreek merged 1 commit intopurescript:masterfrom
kritzcreek merged 1 commit intopurescript:masterfrom
Conversation
Member
|
We're definitely not doing the rename to |
Member
Author
|
It's easy enough to change in here if we decide to do it before 0.12, so I'll merge this and we can take a look at renaming the |
natefaubion
reviewed
Mar 27, 2018
| untilFixedPoint (return . tidyUp) . tco . inlineST =<< untilFixedPoint (return . magicDo) js' | ||
| untilFixedPoint (return . tidyUp) . tco . inlineST | ||
| =<< untilFixedPoint (return . magicDo') | ||
| =<< untilFixedPoint (return . magicDo) js' |
Contributor
There was a problem hiding this comment.
I know you already merged this, but since this is just a pure fn, could this not just be untilFixedPoint (return . magicDo' . magicDo) just to lose the extra fixed point pass (which can be expensive).
Member
Author
There was a problem hiding this comment.
I wasn't entirely sure if it was safe to interleave the two transformations. In the rare case someone mixes the two in the same module, but I guess the typechecker would've rejected the program at that point...
This file contains hidden or 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
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.
Simplest thing I could come up with. This adds another pass over the JS AST, so if that ends up being to slow I can look into merging these into a single pass, or checking for an import of Control.Monad.Eff/Control.Monad.Effect before doing the traversal.