On Wed, 29 Dec 2010, michael rice wrote:

In the case of ReaderT and StateT

newtype ReaderT r m a = ReaderT {
        -- | The underlying computation, as a function of the environment.
        runReaderT :: r -> m a
    }

newtype StateT s m a = StateT { runStateT :: s -> m (a, s) }

what is the existing type?


The existing type is 'r -> m a'. You could also write

newtype ReaderT r m a = ReaderT (r -> m a)

This would be the same type as above, but it would have no accessor function 'runReaderT'.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to