On Sat, 22 Nov 2008, Janis Voigtlaender wrote:
Definitely. And that surfaces even in quite innocently looking programs and statements about them. The introductory example of the following technical report may be amusing in that respect: http://wwwtcs.inf.tu-dresden.de/~voigt/TUD-FI08-08.pdf
In example 1, I don't see on the one hand, why 'takeWhile (null.tail)' could fail with "tail: empty list", since all lists in '[[i] | i <- [1..(div 1 0)]]' are non-empty (namely singletons). On the other hand, aren't those imprecise error problems not just proofs that mixing up errors and exceptions (here treating errors as exceptions) is a bad thing? 'error' is only a candy version of 'undefined' for simplifying debugging. If all 'error's are replaced by 'undefined' (plain bottom) then 'takeWhile p (map h l)' and 'map h (takeWhile (p.h) l)' behave also visually identical, don't they?
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
