patch applied (packages/mtl): use Control.Monad.Instances from
base
Donald Bruce Stewart
dons at cse.unsw.edu.au
Tue Apr 11 11:06:46 EDT 2006
ross:
> Mon Apr 10 04:25:33 PDT 2006 Ross Paterson <ross at soi.city.ac.uk>
> * use Control.Monad.Instances from base
>
> M ./Control/Monad/Error.hs -4 +1
> M ./Control/Monad/Reader.hs -10 +1
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
Anyone agree? Seems very "foundational"
-- Don
More information about the Cvs-libraries
mailing list