-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add 'Raise' and 'Subsume' #370
Conversation
👏 |
|
I wonder whether a better name for |
I like @googleson78's realization about what |
guess I'm unclear about why it's called |
I guess this is the reason 😄 |
I see 🙃 I would argue that the name |
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.
Like magic!
I don't like the names. Something like raiseGeneral
and subsumeGeneral
would be better.
I'm also slightly concerned about the performance characteristics, but if they turn out to be bad, we can revert the definitions of raiseUnder
and subsume
and friends to their earlier definitions at a later points.
Actually, wait. We don't need this, do we? The |
We can't change When it comes to names, I would prefer something short - that |
Oh, well that's fine then. I'd prefer |
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.
I was also thinking whether the typeclasses would be an issue, but I'm hoping that if you use the concrete versions there won't be any (additional) dictionary passing?
Even in case with polymorphic "tail", that typeclass duo should resolve into concrete instance - and GHC is really good at inlining instances (see Generics). |
why? isn't |
@tek I would say that depends a lot on context - and in this context connection to |
Can be considered ready? |
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.
I consider it so.
Regarding _
vs '
: '
's also got a convention, namely, strictness. Neither convention is universally observed: for example, mask_
isn't a void
-ed version of mask
.
See https://funprog.srid.ca/polysemy/raiseunder-and-multiple-effect-interpretation.html and #369.