[ANN] transformers-base, transformers-abort, monad-abort-fd

Hi Cafe. I've been using these three small transformer libraries for awhile, so it's probably time to announce them. transformers-base[1] introduces a generalized version of MonadIO, MonadBase (BaseM in monadLib terms). It's very useful when you are trying to make a stateful API work in both IO and STM (and all transformer stacks on top of them). transformers-abort[2] basically gives you two versions of EitherT, one for errors and one for short-circuiting. Includes instances for semigroupoids and monad-control classes. monad-abort-fd[3] is a typical companion auto-lifter package for transformers-abort. But it also provides a generalized version[4] of Control.Exception which tries to thread effects properly (e.g. finalizers can read (if control didn't escape) and modify the state in StateT). [1] http://hackage.haskell.org/package/transformers-base [2] http://hackage.haskell.org/package/transformers-abort [3] http://hackage.haskell.org/package/monad-abort-fd [4] http://hackage.haskell.org/packages/archive/monad-abort-fd/0.3/doc/html/src/...

On 10 November 2011 12:58, Mikhail Vorozhtsov
transformers-base[1] introduces a generalized version of MonadIO, MonadBase (BaseM in monadLib terms).
Hi Mikhail, nice packages! I'm currently giving monad-control a new design and I'm planning to generalize MonadControlIO to MonadBaseControl. I would like to use your MonadBase as a super class of MonadBaseControl. However, your package depends on monad-control to define a similar class. Of course this prevents monad-control to depend on transformers-base. Are you willing to drop the monad-control dependency (and remove Control.Monad.Base.Control)? I send you a pull request that implements this change. The pull request also contains a patch that makes some other changes: * Use CPP macros to abstract the repetitious instances * Add instances for all base monads in the base library * Use descriptive variable names: 'm' for monad, 'b' for base monad * Reversed order of 'b' and 'm' to match BaseM from monadLib Hopefully you are fine with these changes, otherwise no hard feelings ;-) Cheers, Bas

Felipe Almeida Lessa
It's funny how we, haskellers, find 'm' and 'b' descriptive names. I know many programmers who would cry after seeing this =).
It takes a bit of practice to get used to, but then they really are descriptive. The trick is to keep the number of entities - parameters, types, etc low enough to keep mental track. To me, LongAndVeryDescripteNames is a code smell: your code is too complicated. Let them cry, I say! -k -- If I haven't seen further, it is by standing in the footprints of giants
participants (4)
-
Bas van Dijk
-
Felipe Almeida Lessa
-
Ketil Malde
-
Mikhail Vorozhtsov