snapframework/snap

Use exceptions instead of MonadCatchIO-transformers

Closed this issue · 1 comments

Contrary to what this issue seems to suggest, snap still depends on the deprecated MonadCatchIO-transformers package, and still provides MonadCatchIO instances instead of MonadThrow instances.

The latest version of Snap is v0.14.0.7 - https://hackage.haskell.org/package/snap-0.14.0.7 and it depends on snap-core v0.9.8.0 - https://hackage.haskell.org/package/snap-core-0.9.8.0, which in turn depends on the deprecated package MonadCatchIO-transformers (>=0.2.1 && <0.4).

In addition, MonadSnap only seems to extend MonadCatchIO, and not MonadThrow/MonadCatch. From - https://hackage.haskell.org/package/snap-core-0.9.8.0/docs/Snap-Core.html -

class (Monad m, MonadIO m, MonadCatchIO m, MonadPlus m, Functor m, Applicative m, Alternative m) => MonadSnap m where
  ...

Is there any reason for this? How difficult would it be to move over to the non-deprecated exceptions package?

We have already gotten rid of MonadCatchIO-transformers in Snap 1.0 and switched to using monad-control. See, for example, here:

https://github.com/snapframework/snap/blob/master/snap.cabal#L124