On 5 July 2010 10:39, Yves Parès <limestr...@gmail.com> wrote: > Then what is your alternative? How do you replace monad transformers?
Possibly more a case of doing without rather than replacing them with something else, you would amalgamate all the monadic effects you want into one monad. E.g. State and Environment (reader) and partiality (Maybe) newtype Amalgamated s e a = Amalgamated { getAmalgamated :: e -> s -> (Maybe a,st) } instance Monad (Amalgamated s e) where return a = Amalgamated $ \e s -> return (Just a, st) m >>= k = Amalgamated $ \e s -- TODO (after the first coffee of the morning...) _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe