2010/7/25 Eugeny N Dzhurinsky :
> Hello, everybody!
>
> I am trying to develop some sort of library, which supposed to sign into a WEB
> service, then perform some requests with it.
>
> Initially I designed methods in the following way
>
> data DServError = InvalidCredentials | InvalidRequest | ...
Yeah, ErrorT should do what you want (EitherT is probably essentially the
same thing)
login would have the type:
login :: String -> String -> ErrorT DServError IO LoginResponse
and you would use it like this:
result <- runErrorT $ authenticatedReq
You can use runErrorT, or catch when you want to
Hello, everybody!
I am trying to develop some sort of library, which supposed to sign into a WEB
service, then perform some requests with it.
Initially I designed methods in the following way
data DServError = InvalidCredentials | InvalidRequest | ...
newtype Result a = Result { getOpResult ::