Hacker News new | ask | show | jobs
by codygman 4350 days ago
Take the following with a grain of salt (others correct me if I'm wrong), I'm very new to using monad transformers:

"->" is pronounced to. "::" is pronounced "is a".

EitherIO is a function from "IO (Either e a) -> EitherIO e a".

runEitherIO is a function from "EitherIO e a -> IO (Either e a).

In any function that allows using the IO monad (your main function for example) you'll you'll have:

result <- runEitherIO SomeEitherIOVariable

Result's type is "result :: Either e a". Now you just have a normal Either to deal with.