Skip to content
  • Herbert Valerio Riedel's avatar
    7289f1f6
    Generalise constraints for InputT instances · 7289f1f6
    Herbert Valerio Riedel authored
    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 GHC 7.10 (post-AMP)
    7289f1f6
    Generalise constraints for InputT instances
    Herbert Valerio Riedel authored
    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 GHC 7.10 (post-AMP)
Loading