snapframework / snap-core

Core type definitions (Snap monad, HTTP types, etc) and utilities for web handlers.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
317 stars 85 forks source link

Redundant constraints for MonadSnap #248

Open treeowl opened 8 years ago

treeowl commented 8 years ago

Currently,

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

For GHC before 7.10, that should be

class (MonadCatchIO m, MonadPlus m, Alternative m) => MonadSnap m

For GHC 7.10 and later, it should be

class (MonadCatchIO m, MonadPlus m) => MonadSnap m

Note also that the package snap-core gets MonadCatchIO from is marked obsolete; it's been replaced by another.

gregorycollins commented 8 years ago

Is that a problem? I don't think it warns, does it? I actually prefer the expanded list for didactic reasons.

Re: MonadCatchIO, we're not using it in 1.0 (which is getting close to being released).

treeowl commented 8 years ago

I'm not sure if it warns with -Wall or not. It's mostly a lot to dig through to figure out the essence of what it means. And it looks ugly.