Fwd: Misleading documentation for `fail`
Andreas Abel
andreas.abel at ifi.lmu.de
Fri Feb 7 10:10:55 UTC 2020
> error on GHC 8.8+. Should this bit be removed?
I'd say it should be put under a suitable #if conditional.
(For the sake of developers who wish to support many GHC versions.)
On 2020-02-07 03:47, Artem Pelenitsyn wrote:
> Hello,
>
> The fail package [1] lists libraries at haskell.org
> <mailto: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
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
More information about the Libraries
mailing list