X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FBuildTyCl.lhs;h=4319d1fc187a0e76d23432397725f40f7edfd20c;hb=2b8358cfe8b6399874090c099e3b96e932c6ccbb;hp=de57feb928e1b9d9f689f392c701c3f25aa01819;hpb=d2ce0f52d42edf32bb9f13796e6ba6edba8bd516;p=ghc-hetmet.git diff --git a/compiler/iface/BuildTyCl.lhs b/compiler/iface/BuildTyCl.lhs index de57feb..4319d1f 100644 --- a/compiler/iface/BuildTyCl.lhs +++ b/compiler/iface/BuildTyCl.lhs @@ -112,15 +112,9 @@ mkDataTyConRhs :: [DataCon] -> AlgTyConRhs mkDataTyConRhs cons = DataTyCon { data_cons = cons, - is_enum = -- We define datatypes with no constructors to not be - -- enumerations; this fixes trac #2578, Otherwise we - -- end up generating an empty table for - -- __closure_tbl - -- which is used by tagToEnum# to map Int# to constructors - -- in an enumeration. The empty table apparently upset - -- the linker. - not (null cons) && + is_enum = not (null cons) && all isNullarySrcDataCon cons + -- See Note [Enumeration types] in TyCon } mkNewTyConRhs :: Name -> TyCon -> DataCon -> TcRnIf m n AlgTyConRhs