[Haskell-cafe] Newbie question on Haskell type

voigt.16734551 at bloglines.com voigt.16734551 at bloglines.com
Fri Oct 14 01:49:27 EDT 2005

--- Cale Gibbard <cgibbard at gmail.com wrote:
> As an example of this sort
of thing, I know that there are only 4
> values of type a -> Bool (without
the class context). They are the
> constant functions (\x -> True), (\x ->
False), and two kinds of
> failure (\x -> _|_), and _|_, where _|_ is pronounced
"bottom" and
> represents something along the lines of nontermination (aborting
> program also counts).

Not exactly. There are also (\x -> seq x True)
and (\x -> seq x False), neither of which is equivalent to any of the four
functions above.

Janis Voigtlaender.

More information about the Haskell-Cafe mailing list