packages icon indicating copy to clipboard operation
packages copied to clipboard

Add MonadMask instance for FlowT ?

Open fonghou opened this issue 6 years ago • 1 comments

Hi,

FlowT in 2.4 is a very ergonomic alternative compare to Variant on the Left of Either. I like it a lot. Just want to bring up an enhancement for discussion.

Since it has a MonadIO instance, should FlowT also provide MonadMask instance (and its superclass instances)?

http://hackage.haskell.org/package/exceptions-0.10.0/docs/Control-Monad-Catch.html#v:generalBracket

btw, I'm not proposing that FlowT needs all n^2 mtl instances because Variant on the Left of ExceptT already serves that purpose well enough for now.

Thanks! Feng

fonghou avatar Nov 09 '18 02:11 fonghou

Hi, I've just added the instances (adapted from ExceptT's ones) but I haven't tested them yet. Tell me if something goes wrong! Thanks!

hsyl20 avatar Nov 16 '18 17:11 hsyl20