[Haskell-cafe] Re: Wikipedia on first-class object
Miguel Mitrofanov
miguelimo38 at yandex.ru
Fri Dec 28 04:21:36 EST 2007
> How can I test that partial order in Haskell ?
You can't. It's kinda internal. More specifically, if you try to compute a value, which is not maximal in this order, you'll get an error or loop forever. But you still can use such values in your programs if you don't try to compute them. The point is, maximal values are the only interesting ones, and all others are just approximations.
In fact, you only have to worry about non-maximal values when you use recursion. The fundamental property of Haskell is that it computes the least fixed point. For example, if f maps (_|_) to (_|_), then "let x = f x in x" will evaluate to (_|_) - and you loop forever, see above.
More information about the Haskell-Cafe
mailing list