Chris,

I'm not sure what exactly your question is as you are mixing up several concepts. However, you start with:

In haskell, we can transform:

g x + f x

into:

f x + g x
Here you assume that the function + is commutative. Although this is probably true for all numeric types in all Haskell implementations, neither functional languages in general nor the Haskell report guarantee commutativity of +. So this assumption is dangerous.

0 + _|_ /= _|_ + 0

Or, does this just become:

_|_ = _|_ ?
The Haskell report probably does not say so explicitly, but in general primitive functions like + are strict in all arguments and hence 0 + _|_ = _|_ = _|_ + 0.

Ciao,
Olaf

_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to