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

Make interpretH and friends expose Monad on existential m #333

Merged

Conversation

A1kmm
Copy link
Contributor

@A1kmm A1kmm commented Apr 8, 2020

In the process replace the existentially quantified parameter m of the
Weaving with a parameter r and use Sem r.

See also https://github.com/polysemy-research/polysemy/compare/master...A1kmm:weavingdetails-sem-experiment?expand=1 for this change broken down into smaller commits.

In the process replace the existentially quantified parameter `m` of the
Weaving with a parameter `r` and use `Sem r`.
@A1kmm
Copy link
Contributor Author

A1kmm commented Apr 8, 2020

Closes #304

Copy link
Collaborator

@KingoftheHomeless KingoftheHomeless left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to go through this!

There are some additional changes you've made that I disagree with; some more than others. If you want to keep them, you'll have to convince me they're worth it.

There's also the question if we should change the type signatures of interpret and intercept to also specify that the provided m is Sem r0/a monad for symmetry (rather than usefulness). Either's fine for me.

src/Polysemy/Internal/Union.hs Outdated Show resolved Hide resolved
src/Polysemy/Internal/Union.hs Show resolved Hide resolved
src/Polysemy/Internal/Union.hs Outdated Show resolved Hide resolved
src/Polysemy/Internal/Union.hs Outdated Show resolved Hide resolved
src/Polysemy/Internal/Combinators.hs Outdated Show resolved Hide resolved
src/Polysemy/Internal/Combinators.hs Show resolved Hide resolved
src/Polysemy/Internal/Combinators.hs Outdated Show resolved Hide resolved
@A1kmm A1kmm force-pushed the weaving-existential-m branch from 65db238 to bbf93d3 Compare April 9, 2020 07:21
@A1kmm A1kmm requested a review from KingoftheHomeless June 15, 2020 11:58
@A1kmm A1kmm force-pushed the weaving-existential-m branch from e71ff72 to 70aae42 Compare June 16, 2020 12:49
Copy link
Collaborator

@KingoftheHomeless KingoftheHomeless left a comment

Choose a reason for hiding this comment

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

Thank you! All that remains now are some stylistic choices, a minor inconsistency, and an update in documentation.

src/Polysemy/Internal/Union.hs Show resolved Hide resolved
src/Polysemy/Bundle.hs Outdated Show resolved Hide resolved
src/Polysemy/Internal/Combinators.hs Show resolved Hide resolved
src/Polysemy/Internal/Union.hs Outdated Show resolved Hide resolved
src/Polysemy/Internal/Union.hs Outdated Show resolved Hide resolved
src/Polysemy/Tagged.hs Outdated Show resolved Hide resolved
src/Polysemy/Tagged.hs Outdated Show resolved Hide resolved
src/Polysemy/Writer.hs Outdated Show resolved Hide resolved
src/Polysemy/Bundle.hs Outdated Show resolved Hide resolved
src/Polysemy/Internal/Union.hs Outdated Show resolved Hide resolved
@A1kmm A1kmm requested a review from KingoftheHomeless June 17, 2020 12:05
Copy link
Collaborator

@KingoftheHomeless KingoftheHomeless left a comment

Choose a reason for hiding this comment

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

All good! Thanks for this!

@KingoftheHomeless KingoftheHomeless merged commit a09b3a7 into polysemy-research:master Jun 17, 2020
googleson78 added a commit that referenced this pull request Jun 17, 2020
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.

2 participants