[project @ 2001-09-07 16:52:53 by simonpj]
authorsimonpj <unknown>
Fri, 7 Sep 2001 16:52:53 +0000 (16:52 +0000)
committersimonpj <unknown>
Fri, 7 Sep 2001 16:52:53 +0000 (16:52 +0000)
Make isStrictDmd give the right answer

ghc/compiler/basicTypes/NewDemand.lhs

index 58d682a..d496c96 100644 (file)
@@ -223,12 +223,13 @@ seqDmd  = Seq Keep []     -- Polymorphic seq demand
 evalDmd = Eval
 
 isStrictDmd :: Demand -> Bool
-isStrictDmd Bot       = True
-isStrictDmd Err              = True               
-isStrictDmd (Seq _ _) = True
-isStrictDmd Eval      = True
-isStrictDmd (Call _)  = True
-isStrictDmd other     = False
+isStrictDmd Bot         = True
+isStrictDmd Err                 = True            
+isStrictDmd (Seq Drop _) = True        -- But not Defer!
+isStrictDmd (Seq Keep _) = True
+isStrictDmd Eval        = True
+isStrictDmd (Call _)    = True
+isStrictDmd other       = False
 
 instance Outputable Demand where
     ppr Lazy      = char 'L'