
Thanks, this is helpful. It should have made me suspicious that I had to hide the fail from Prelude. What happens here is that for ghc-8.6 and earlier the fail that is called by regex-tdfa is not the one from class MonadFail but the one from class Monad, even though the MonadFail class exists. And apparently newtype deriving will create an instance that calls error (either because the instance Monad for Either String does or because of a default definition). So for ghc-8.6 and older I will have to write a bogus instance MonadFail (since makeRegexM requires it) and have to write out the Monad instance manually. Cheers Ben Am 28.05.23 um 22:53 schrieb Travis Cardwell via Haskell-Cafe:
The `fail` method was part of the `Monad` type class from GHC 8.0 (`base` `4.9.0.0`) until GHC 8.6 (`base` `4.12.0.0`).
https://hackage.haskell.org/package/base-4.12.0.0/docs/Control-Monad.html#v:...
It was removed from GHC 8.8 (`base` `4.13.0.0`).
https://hackage.haskell.org/package/base-4.13.0.0/docs/Control-Monad.html#t:...
There is information about this in the MonadFail Proposal (MFP):
https://gitlab.haskell.org/haskell/prime/-/wikis/libraries/proposals/monad-f...
Cheers,
Travis _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- I would rather have questions that cannot be answered, than answers that cannot be questioned. -- Richard Feynman