[project @ 2001-10-23 08:58:30 by simonpj]
authorsimonpj <unknown>
Tue, 23 Oct 2001 08:58:30 +0000 (08:58 +0000)
committersimonpj <unknown>
Tue, 23 Oct 2001 08:58:30 +0000 (08:58 +0000)
-------------------------------
Correct a nasty lub bug
-------------------------------

MERGE WITH STABLE BRANCH

Peter Sestoft discovered that lub wasn't commutative.
We certainly want that

Err `lub` Abs = Lazy

This is a Real Bug.

ghc/compiler/stranal/DmdAnal.lhs

index 11071d4..a28b4b5 100644 (file)
@@ -791,6 +791,7 @@ lub :: Demand -> Demand -> Demand
 lub Bot d = d
 
 lub Err Bot = Err 
+lub Err Abs = Lazy     -- E.g. f x = if ... then True else error x
 lub Err d   = d 
 
 lub Lazy d = Lazy