|
|
On Mon, Aug 13, 2007 at 04:35:12PM +0200, apfelmus wrote:
> My assumption is that we have an equivalence
>
> forall a,b . m (a -> m b) ~ (a -> m b)
>
> because any side effect executed by the extra m on the outside can well be
> delayed until we are supplied a value a. Well, at least when all arguments
> are fully applied, for some notion of "fully applied"
(\a x -> a >>= ($ x)) ((\f -> return f) X) ==> (Î)
(\a x -> a >>= ($ x)) (return X) ==> (Î)
(\x -> (return X) >>= ($ x)) ==> (monad law)
(\x -> ($ x) X) ==> (Î on the sugar-hidden 'flip')
(\x -> X x) ==> (Î)
X
Up to subtle strictness bugs arising from my use of Î :), you're safe.
Stefan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe
|
|