patch applied (packages/mtl): use Control.Monad.Instances from
ross at soi.city.ac.uk
Tue Apr 11 13:13:53 EDT 2006
On Wed, Apr 12, 2006 at 01:06:46AM +1000, Donald Bruce Stewart wrote:
> Oh, that reminds me. Something we've often talked about on #haskell.
> Should the (a -> ) monad in Control.Monad.Reader be moved into the
> base package, since its such a fundamental structure?
> Its quite hard to find, which is annoying since lambdabot's refactoring
> tools use the (a ->) monad all over the place.
> This guy:
> instance Functor ((->) r) where
> fmap = (.)
> instance Monad ((->) r) where
> return = const
> m >>= k = \r -> k (m r) r
They're now in Control.Monad.Instances, as are the Functor instances for
(,) and Either. The MonadFix instance is now in Control.Monad.Fix.
More information about the Cvs-libraries