On Thu, Mar 8, 2012 at 6:09 AM, Henning Thielemann <lemming@henning-thielemann.de> wrote:
I'd prefer to call them stateT, readerT, writerT in order to keep 'state', 'reader', 'writer' with the restricted types. The restricted type should work without type annotations in cases where I really only want type 'State'. Actually stateT, readerT, writerT are only alternative constructors for StateT, ReaderT, WriterT with a restriction on 'm'.
On Thu, 8 Mar 2012, Ross Paterson wrote:
* generalized constructor functions:
state :: Monad m => (s -> (a, s)) -> StateT s m a
reader :: Monad m => (r -> a) -> ReaderT r m a
writer :: Monad m => (a, w) -> WriterT w m a
We might discuss, whether (Monad m) is too restrictive or whether it should be only (Functor m).
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries