On Wed, 22 Mar 2000, Frank Atanassow wrote:

> But some programs make essential use of bottom in a denotational way,
> and then functions defined on the type in question are required to be
> strict.

They can't, because each legal function is continuous. If it has a
different value depending on whether its argument is bottom or not, the
value for bottom argument is bottom. The only way an additional strictness
can change the semantics is to make a previously working program fail.

Some extensions allow other weird things. In GHC it is possible to write
an approximation of the function "detectBottom :: a -> Maybe a" with
obvious meaning, which would try to evaluate the argument for specified
time and only return incorrect Nothings when the evaluation is taking too
much time or perhaps memory.

-- 
Marcin 'Qrczak' Kowalczyk



Reply via email to