commercialhaskell / rio

A standard library for Haskell
Other
838 stars 54 forks source link

RIO doesn't have an instance of MonadFail #209

Closed jeffhappily closed 4 years ago

jeffhappily commented 4 years ago

In GHC 8.8.1, fail has been removed from Monad in favor of the fail method in MonadFail class. https://downloads.haskell.org/~ghc/8.8.1/docs/html/users_guide/8.8.1-notes.html#base-library

So with GHC 8.8.1 or later, all usage of fail in RIO will fail due to (RIO env) not having an instance of MonadFail

Could not deduce (MonadFail (RIO env))
        arising from a use of ‘fail’

Should this be added in?

snoyberg commented 4 years ago

No, it makes it too easy to accidentally introduce partial pattern matches.