Suppress invalid Core Lint complaint about lack of constructors
authorsimonpj@microsoft.com <unknown>
Thu, 2 Oct 2008 13:24:26 +0000 (13:24 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 2 Oct 2008 13:24:26 +0000 (13:24 +0000)
compiler/coreSyn/CoreLint.lhs

index 2b2a6e8..2d45eb3 100644 (file)
@@ -335,6 +335,7 @@ lintCoreExpr e@(Case scrut var alt_ty alts) =
          Just (tycon, _)
               | debugIsOn &&
                 isAlgTyCon tycon && 
          Just (tycon, _)
               | debugIsOn &&
                 isAlgTyCon tycon && 
+               not (isOpenTyCon tycon) &&
                 null (tyConDataCons tycon) -> 
                   pprTrace "Lint warning: case binder's type has no constructors" (ppr var <+> ppr (idType var))
                        -- This can legitimately happen for type families
                 null (tyConDataCons tycon) -> 
                   pprTrace "Lint warning: case binder's type has no constructors" (ppr var <+> ppr (idType var))
                        -- This can legitimately happen for type families