[Haskell-cafe] Re: Laws and partial values

David Menendez dave at zednenem.com
Sat Jan 24 19:05:29 EST 2009


2009/1/24 Conal Elliott <conal at conal.net>:
> Incorrect *if* the semantics distinguishes between () and _|_ (as apparently
> is the choice in Haskell).

In case there was any question, section 3.17.3 of the Haskell 98 Report states,

    case _|_ of { K x1 ... xn -> e; _ -> e' } = _|_
    where K is a data constructor of arity n

This means that \() -> () is strict, and will behave differently if
given () or _|_.

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>


More information about the Haskell-Cafe mailing list