On Wed, May 05, 2010 at 02:54:27PM -0700, Ryan Ingram wrote: > ErrorT is just a newtype wrapper, changing the order/application of > the type variables. > > newtype ErrorT e m a = ErrorT (m (Either e a)) > runErrorT (ErrorT action) = action > > This gives the bijection: > > ErrorT :: m (Either e a) -> ErrorT e m a > runErrorT :: ErrorT e m a -> m (Either e a)
That syntax is not clear for me - so ErrorT is some sort of function (calculation), which takes a monad with type (Either e a) and produces type ErrorT e m a ? Basically, i don't understand what does "ErrorT ::" means - it should name the function - but it starts with capital letter? I feel like I missed something when learning type system and syntax of Haskell :( -- Eugene N Dzhurinsky
pgp58bWRrrwfP.pgp
Description: PGP signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe