18 Nov 2003:  Did some leakage analisys: NondetT and WriterT may leak.
As usual this because of a fine interaction with lazyness.  
The problem with Writer is if the "output" is not looked at.
The poblem with Nondet occurs of the "alternatives" are not looked at.




This is an experimental replacement for the current monad library.
(at some point the Unstable. part of the names should disappear)

It is mostly complete, but some more work is needed in places,
in particular the interaction of continuations with other features.
also a lot more tests/laws are need.  

Resumptions are very new and not well tested.  Also the nonstandard
morphisms for them are not fixed.

Changes from the original library
=================================

General:
  * the monads are implemented in terms of the transformers
    - the transformer files end in "T"
    - the monad files have no "T" at the end
    - a monad file defines a type synonym, and redefines the "run" functions.
  * The file Transformers imports all transformers
  * The file All imports everything in the library
    (it is not very useful except for compiling the library)
  * Currently there is no ListT, instead we have NondetT,
    which is (kind of) based on what's in Ralf Hinze's 
    "Deriving Monad Transformers" paper.
  * there is no RWS transformer
  * NondetT transformer is new
  * ResumeT is new
  * New class HasBaseMonad to perform computations in the "heart" of the monad
  * structural changes in the code
    - tried to capture common patterns in definitions
    - the library is currently in "column" format, i.e.
      a file for a transformer contains:
        - basic instances (Functor, Monad, HasBaseMonad, MonadFix)
        - arbitrary functions (mostly from old library) things like "run" etc.
        - liftings of all features only for this transformer

  * MonadPlus is used for backtracking and _not_ error handling
  * none of the transformers implement "fail" it is just passed along to the base monad,
    thus: fail x = inBase (fail x)
    - reason for that is that there seems to be no reasonable way to implement it

  
Specific:

For details of what is in the library look at the documentation.
Here are only some of the differences with the old monadic library.


Writer: * new behavior for "listen": it does not produce any output
          thus: oldListen m = do (a,w) <- listen m
                                 tell w
        * moved "pass" out of the class (implemented in terms of the other functions)
Error:  * renamed method "throwError" to "raise"
        * renames method "catchError" to "handle"
        * "throwError" and "catchError" are defined as functions for compatibility
        * removed Error class, now errors can be of any type
        * fail "" does _not_ cause an error to be thrown  (see comments above)
        * mzero does _not_ cause an error to be thrown  (see comments above)
        * mplus does _not_ handle errors (see comments above)
Nondet: new
Resume: new
Cont:   currently does not work well, when continuations are outside other transformers


People
======

Discussions etc should probably be sent to:
libraries@haskell.org

Author of current version:  Iavor S. Diatchki <mailto:diatchki@cse.ogi.edu>
Based upon the original by: Andy Gill <mailto:andy@cse.ogi.edu>
The ErrorT in the original library was rendered by: Michael Weber <mailto:michael.weber@post.rwth-aachen.de>
The initial version of the NondetT code in CPS style was from (this has now changed): Andrew J Bromage <mailto:ajb@spamcop.net>

iavor: if I forgot someone (sorry!) please send me email and I'll add you 

