[Haskell-cafe] ANNOUNCE: AbortT-transformers version 1.0

Gregory Crosswhite gcross at phys.washington.edu
Fri Sep 3 22:01:08 EDT 2010

 For whatever reason, nobody seems to have gotten around to implementing
an Abort monad transformer (outside the monadLib package), so I decided
to write one myself since I wanted the functionality but I use
"transformers" rather than "monadLib".

An abortable monadic computation runs until either it is finished or it
is aborted by calling the "abort" function.  All steps in the
computation after "abort" has been called are ignored, which means that
abort can be assigned an arbitrary type for its value within the

My implementation uses an Either type which is Left if the computation
has been prematurely terminated and Right of the computation is
continuing to proceed as normal.  I could have implemented the
functionality using the Continuation monad, but that seemed to be
overkill in cases where the user only wants a simple abort monad.


More information about the Haskell-Cafe mailing list