Remove MonadFail (ST s) instance

Henning Thielemann lemming at henning-thielemann.de
Mon Nov 25 11:37:47 UTC 2019


On Mon, 25 Nov 2019, Bertram Felgenhauer via Libraries wrote:

> Oleg Grenrus wrote:
>> I cannot see any justification for that instance
>> 
>>     -- | @since 4.11.0.0
>>     instance Fail.MonadFail (ST s) where
>>         fail s = errorWithoutStackTrace s
>
> It's certainly not in the spirit of the MonadFail proposal. Arguably,
> *all* implementations of `fail` in terms of `error*` are wrong, even
> the one for IO. (I suspect dropping the instance for IO would cause a
> lot of pain though...)

Isn't fail in IO a synonym for (ioError . userError) ?


More information about the Libraries mailing list