20
Is it possible to implement (*) with least-strict semantics in Haskell (standardized Haskell preferred, but extensions are OK. Using compiler internals is cheating)? For example, such a definition should result in the following being true:
0 * ⊥ = 0
⊥ * 0 = 0
and only:
⊥ * ⊥ = ⊥
I can build pattern matches that satisfy one of the above cases, but not both, because the zero check forces the value.