Commit 06349b7f authored by judah's avatar judah
Browse files

Merge pull request #31 from hvr/pr/generalise-inputt

Generalise constraints for InputT instances
parents 5c0f472b 7289f1f6
......@@ -47,19 +47,12 @@ newtype InputT m a = InputT {unInputT ::
(ReaderT (IORef KillRing)
(ReaderT Prefs
(ReaderT (Settings m) m)))) a}
deriving (Monad, MonadIO, MonadException)
deriving (Functor, Applicative, Monad, MonadIO, MonadException)
-- NOTE: we're explicitly *not* making InputT an instance of our
-- internal MonadState/MonadReader classes. Otherwise haddock
-- displays those instances to the user, and it makes it seem like
-- we implement the mtl versions of those classes.
instance Monad m => Functor (InputT m) where
fmap = liftM
instance Monad m => Applicative (InputT m) where
pure = return
(<*>) = ap
instance MonadTrans InputT where
lift = InputT . lift . lift . lift . lift . lift
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment