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

Applicative do notation #30

Open
expede opened this issue Jan 2, 2017 · 4 comments
Open

Applicative do notation #30

expede opened this issue Jan 2, 2017 · 4 comments

Comments

@expede
Copy link
Member

expede commented Jan 2, 2017

What it says in the title

@expede
Copy link
Member Author

expede commented Jan 2, 2017

This requires significantly more AST magic than monadic do (#19). Will return to this after completing v1 #29

@OvermindDL1
Copy link
Contributor

Remember, if necessary you can add a post-compilation pass like Protocols uses (where it scans all beam files for things that implement protocols, reads some meta-data out of them, then builds a singular Protocol.* module that inlines everything for speed).

@expede
Copy link
Member Author

expede commented Jan 6, 2017

@OvermindDL1 ah, cool, I haven't dug into how Protocol does that yet. Will check it out for sure 😃

For Applicative Do (as opposed to Monadic Do, which is in the code already), the magic is more around desugaring in a way that lets you do computation in parallel when there are no data dependancies between lines. Here's a detailed explanation from the GHC docs.

This is totally doable (ha! pun), but probably doesn't need to be in there for v1.0.0 launch, especially due to the higher complexity and that fact that it's so new even in Haskell.

@OvermindDL1
Copy link
Contributor

For Applicative Do (as opposed to Monadic Do, which is in the code already), the magic is more around desugaring in a way that lets you do computation in parallel when there are no data dependancies between lines. Here's a detailed explanation from the GHC docs.

Heh, I know, I just noticed some work in type_class and there was not really a good place to mention how Protocols work there, and this issue seemed 5% related, so I dropped it here instead of creating a new issue just to mention how Protocols work. I figure you might find a post-compile hook useful in a variety of work. ^.^

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

No branches or pull requests

2 participants