I'm not sure why the code was written the way it was, but it seems we
can do better by letting GHC directly reuse ReaderT's instances as
well as relaxing the constraints from
instance Monad m => Functor (InputT m)
instance Monad m => Applicative (InputT m)
instance Monad m => Monad (InputT m)
to
instance Functor m => Functor (InputT m)
instance Applicative m => Applicative (InputT m)
instance Monad m => Monad (InputT m)
This looks the same on GHC 7.8 (pre-AMP) as well as on GHC 7.10 (post-AMP)
I'm not sure why the code was written the way it was, but it seems we can do better by letting GHC directly reuse
ReaderT
's instances as well as relaxing the constraints fromto
This looks the same on GHC 7.8 (pre-AMP) as well as on GHC 7.10 (post-AMP)