[project @ 2000-11-24 09:51:38 by simonpj]
[ghc-hetmet.git] / ghc / compiler / types / TyCon.lhs
index 5592d00..a4bf2bc 100644 (file)
@@ -387,7 +387,9 @@ isRecursiveTyCon other                                    = False
 
 \begin{code}
 tyConDataCons :: TyCon -> [DataCon]
-tyConDataCons tycon = ASSERT2( not (null cons), ppr tycon ) cons
+tyConDataCons tycon = ASSERT2( not (null cons), ppr tycon ) 
+                     ASSERT2( length cons == tyConFamilySize tycon, ppr tycon )
+                     cons
                    where
                      cons = tyConDataConsIfAvailable tycon