[Haskell-cafe] [Haskell] Functor => Applicative => Monad
iavor.diatchki at gmail.com
Fri Dec 17 01:29:12 CET 2010
I think that we should make both changes (make Applicative a
super-class of Monad, and remove the "fail" method from Monad). Code
will break but we can fix it.
By the way, just for reference, the proposal to have a separate
failure class and using it in the "do" notation, is how things used to
be back in Haskell 1.4 (one version before Haskell 98). For the
curious, take a look at page 21 of
On Thu, Dec 16, 2010 at 3:57 PM, Lennart Augustsson
<lennart at augustsson.net> wrote:
> On Thu, Dec 16, 2010 at 6:03 PM, John Smith <voldermort at hotmail.com> wrote:
>> On 15/12/2010 14:31, Lennart Augustsson wrote:
>>> Yes, I think there should be a MonadFail distinct from MonadPlus.
>>> Some types, like IO, are not in MonadPlus, but have a special
>>> implementation of the fail method.
>>> Personally, I think fail should just be removed, but that would break
>>> existing code.
>>> The fail method was introduced for the wrong reasons (better error
>>> messages was the excuse).
>> Which other monads (other than MonadPlus subclasses) define fail?
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe