
2 May
2010
2 May
'10
4:57 a.m.
ErrorT :: IO (Either Error String) -> ErrorT Error IO String
I can think that can be written as
ErrorT :: IO (Either Error String) -> ErrorT Error (IO String)
Am I correct?
No, you're not. Similar to function application, type application is also left-associative, so it can (but shouldn't) be written as ErrorT :: IO ((Either Error) String) -> ((ErrorT Error) IO) String In reality, ErrorT (or EitherT, for that matters) is just a disguise (meaning, newtype): newtype ErrorT e m a = ErrorT {runErrorT :: m (Eigher e a)}