
On 09 Jan 2014, at 20:52, Vlatko Basic
wrote: Hi Brandon,
... you did not think out your program sufficiently beforehand ... Yes, that is quite possible. I consider myself an FP beginner still. I encountered that mixing Maybe and Either problem few months ago and I think it was about using parseUri and simpleHTTP and I had to `case` them separately to provide a meaningful error message. Haven't been able to simply chain them. In other words, it was not a nice looking function. Maybe today I'd write it differently.
I suggest taking a loon at the 'errors' package mentioned earlier in this thread, it somewhat simplified my issues with unifying Maybe/Either/EitherT
... what exactly is the problem with using appropriate data types in appropriate places ... It is a good thing. Very good. But I do not think all library writers are using it in correct places. But that's another problem.
vlatko
-------- Original Message -------- Subject: Re: [Haskell-cafe] Why Maybe exists if there is Either? From: Brandon Allbery
To: Vlatko Bašić Cc: Johannes Erber , "haskell-cafe@haskell.org" Date: 09.01.2014 17:32 On Thu, Jan 9, 2014 at 11:25 AM, Vlatko Basic
wrote: ... is letting the programmer do what they need to do with a minimum of fuss or extra work ... But doesn't the need of mixing Maybe and Either cause more work for the programmer? Programmer of library, or programmer using the library?
Arguably if you need to switch from Maybe to Either then you did not think out your program sufficiently beforehand. And if you did think it out, what exactly is the problem with using appropriate data types in appropriate places?
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe