Fwd: Misleading documentation for `fail`

Artem Pelenitsyn a.pelenitsyn at gmail.com
Fri Feb 7 02:47:29 UTC 2020


Hello,

The fail package [1] lists libraries at haskell.org as maintainer's address,
so I'm writing here. The documentation for the single module in the package
claims:

This module can be imported for defining forward compatible MonadFail
instances:

import qualified Control.Monad.Fail as Fail

instance Monad Foo where
  (>>=) = {- ...bind impl... -}

  -- Provide legacy fail implementation for when
  -- new-style MonadFail desugaring is not enabled.
  fail = Fail.fail
  ...

But defining the fail method inside a Monad instance will produce an error
on GHC 8.8+. Should this bit be removed?

--
Best, Artem

[1]: http://hackage.haskell.org/package/fail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200206/22696b8d/attachment.html>


More information about the Libraries mailing list