Fix bogus check for strictness in newtypes
authorsimonpj@microsoft.com <unknown>
Wed, 30 May 2007 14:14:44 +0000 (14:14 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 30 May 2007 14:14:44 +0000 (14:14 +0000)
compiler/typecheck/TcTyClsDecls.lhs

index 5f7a680..ee847f5 100644 (file)
@@ -1008,7 +1008,8 @@ checkNewDataCon con
                -- Return type is (T a b c)
        ; checkTc (null ex_tvs && null theta) (newtypeExError con)
                -- No existentials
                -- Return type is (T a b c)
        ; checkTc (null ex_tvs && null theta) (newtypeExError con)
                -- No existentials
-       ; checkTc (null (dataConStrictMarks con)) (newtypeStrictError con)
+       ; checkTc (not (any isMarkedStrict (dataConStrictMarks con))) 
+                 (newtypeStrictError con)
                -- No strictness
     }
   where
                -- No strictness
     }
   where