-
Notifications
You must be signed in to change notification settings - Fork 33
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
Open to including a "ControlTransformation" data type? #63
Comments
What is |
The application I want to use it for is a better solution to what I called "the instrumented capability problem" in the docs at https://hackage.haskell.org/package/eventuo11y-0.5.0.0/docs/Observe-Event-BackendModification.html. Basically, if you're managing effects like: data FooEffects m = FooEffects
{ countBars :: BarPath -> m Int
, checkpointFoo :: m ()
} you'll often have a function like hoistFoo :: (forall x. m x -> n x) -> FooEffects m -> FooEffects n But this can't be written if one of your effects has Instead of a natural transformation, though, you can |
I see. Except we cannot convert |
Right, I ran into that too. I think this might be solvable if we could take a parameter role as a constraint (Not sure how this would be spelt, a prettier/more general version of If this were fixed, would that impact your interest in adding this? Even though we can't straightforwardly do the conversion currently, it's still morally a concept pertaining to "monad control" in the same way the typeclasses here do. |
Via @amesgen, one option might be to simply have |
Well I'm embarrassed that I recommended you your own post... 😅 |
As
MonadTrans
relates to a natural transformation,MonadTransControl
roughly relates to a type like this:Would this type belong somewhere in
monad-control
?The text was updated successfully, but these errors were encountered: