how would i go about making a "wrapper" monad or effect that would implement a custom bind ? or maybe if i state my problem someone would suggest a better solution: i want to be able to define procedures that i would be able to implement with do-notation such that i would be able to perform an action in-between each step (for instance writing a state in a cache), so my idea is to do that and implement this in the >>= operator, but i'm having trouble seeing how i would do that with polysemy effects
how would i go about making a "wrapper" monad or effect that would implement a custom bind ? or maybe if i state my problem someone would suggest a better solution: i want to be able to define procedures that i would be able to implement with do-notation such that i would be able to perform an action in-between each step (for instance writing a state in a cache), so my idea is to do that and implement this in the >>= operator, but i'm having trouble seeing how i would do that with polysemy effects
I would probably use QualifiedDo with custom bind that reuses normal one
how would i go about making a "wrapper" monad or effect that would implement a custom bind ? or maybe if i state my problem someone would suggest a better solution: i want to be able to define procedures that i would be able to implement with do-notation such that i would be able to perform an action in-between each step (for instance writing a state in a cache), so my idea is to do that and implement this in the
>>=
operator, but i'm having trouble seeing how i would do that with polysemy effectsdrlkf said:
I would probably use
QualifiedDo
with custom bind that reuses normal one