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

Simple variants of runT and bindT #393

Merged
merged 4 commits into from
Nov 18, 2020
Merged

Conversation

KingoftheHomeless
Copy link
Collaborator

@KingoftheHomeless KingoftheHomeless commented Nov 18, 2020

A modified variant of @tek's simple runT and bindT implementation. In comparison, this version:

  • Doesn't require any extra type variables
  • Allows the new combinators to also be used in reinterpret/2/3/H, and not just in interpretH
  • Calls the combinators runTH and bindTH instead of interpretHO and interpretBindHO.

This partially adresses #386.

These names of runTH and bindTH still aren't final unless we want them to be.

@isovector
Copy link
Member

TH sounds like template haskell to me. What is the H supposed to suggest?

@KingoftheHomeless
Copy link
Collaborator Author

"Higher". It's a kind of reference that the corresponding action that would be returned by runT is interpreted recursively and run immediately.
... Yeah, the names aren't stellar. As @tek 's pointed out, we'd ideally express it as monadicallySequenceEmbeddedHigherOrderThunkAndRunCurrentInterpreterOnIt, but that's just a tad too verbose.

@tek
Copy link
Member

tek commented Nov 18, 2020

... Yeah, the names aren't stellar. As @tek 's pointed out, we'd ideally express it as monadicallySequenceEmbeddedHigherOrderThunkAndRunCurrentInterpreterOnIt, but that's just a tad too verbose.

looking at the doc, we can even replace Thunk with Continuation to get full Bingo

@KingoftheHomeless
Copy link
Collaborator Author

We decided to come full circle and name them runTSimple and bindTSimple as per the original suggestions in #386.

@KingoftheHomeless KingoftheHomeless merged commit 478c86e into master Nov 18, 2020
@tek tek deleted the interpreth-combinators branch November 18, 2020 19:51
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.

4 participants