Add remaining instances for Comonad transformers#145
Add remaining instances for Comonad transformers#145thomashoneyman merged 1 commit intopurescript:masterfrom
Conversation
|
🏓 @garyb |
|
I did take a look at this, but I don't feel qualified to approve it, since I'm not that familiar with comonad patterns. Perhaps @MonoidMusician or @LiamGoodacre could chime in, I think they're more theorypilled than me? 😉 |
MonoidMusician
left a comment
There was a problem hiding this comment.
Yup, looks good to me! It’s doing the “obvious” thing, which is just the opposite of the usual monadic constructions.
Ah okay. I did once implement some comonad stuff and it seemed way too trivial to be correct. I asked someone and they weren't sure if it was right either. 😄 |
|
Yeah, this is just lifting instances like |
|
Are we good to merge this btw? |
| lowerTrack :: forall t m w a. ComonadTrans t => ComonadTraced m w => m -> t w a -> a | ||
| lowerTrack m = track m <<< lower |
There was a problem hiding this comment.
is this an implementation detail, or something to be exported? (It's currently being implicitly exported).
There was a problem hiding this comment.
whoops, yeah this should not be exported
Description of the change
Adds
ComonadAsk,ComonadEnv, andComonadTracedinstances forStoreT,EnvT, andTracedTCloses #35
Checklist: