[Haskell-cafe] The values of infinite lists

Deokhwan Kim dk at ropas.snu.ac.kr
Wed May 10 01:00:20 EDT 2006


Are the values of infinite lists _|_ (bottom)?

In section 1.3, the Haskell 98 report said as follows:

   Errors in Haskell are semantically equivalent to _|_. Technically,
   they are not distinguishable from nontermination, so the language
   includes no mechanism for detecting or acting upon errors.

Therefore, the value of the following infinity is _|_. Right?

   data Nat = Zero | Succ Nat

   infinity = Succ infinity

What about infinite lists? For example, is the value of [1 ..] also _|_?

Thanks.


More information about the Haskell-Cafe mailing list