[Haskell-cafe] Applicative and Monad transformers

Iain Alexander ia at stryx.demon.co.uk
Thu Aug 27 20:01:09 EDT 2009


On 27 Aug 2009 at 07:48, Ralf Hinze wrote:

>     \ x -> (v >>= \ a -> return ((u x) a)) x
>   = { definition of >>= }
>     \ x -> (\ a -> return ((u x) a)) (v x) x
> 

Something seems to have gone wrong here - shouldn't that be

  \x -> (\y -> (\a -> return ((u x) a)) (v y) y) x
 = { beta }
  \x -> (\a -> return ((u x) a)) (v x) x

?

... but then we appear to end up in the same place.  Now all I've got to do is 
figure out what you were trying to establish in the first place.  :-)

I don't entirely follow what the OP's up to, so you may have a point, but it's 
far from clear.  You're talking about the reader monad, whereas he's talking 
about the effects in the ReaderT-transformed monad.
-- 
Iain Alexander      ia at stryx.demon.co.uk



More information about the Haskell-Cafe mailing list