Stefan,

Something like your proposal for `irrefutable cases' was tried out
by Friedman and Wise a long time ago.  I hope I'm remembering that
correctly -- I have an even more vague memory that the original
idea was proposed by McCarthy.  You should follow this up by
contacting Friedman and Wise to check the original sources.

The basic idea was that

        if e0 then e1 else e2

evaluates by evaluating both e1 and e2.  Only at the point where
e1 and e2 differ is e0 evaluated.  Thus

        if bottom then e else e  ==  e

holds.

However, I don't think this idea is of sufficiently general utility
to be included in Haskell.  If this sort of behaviour is required,
it is possible, if laborious, for the user to define it explicitly.

-- P





Reply via email to