diff options
author | simonpj@microsoft.com <unknown> | 2010-09-14 11:38:50 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-09-14 11:38:50 +0000 |
commit | 13adf25f23091c8ef1a14cfb11ed9379ffbaed90 (patch) | |
tree | 557bb930da2020b7c2d66ff3e212bfd14213e6c4 /compiler/iface/BuildTyCl.lhs | |
parent | afe4534704e8e0c25e2f90c6c0a2e397ecef24db (diff) | |
download | haskell-13adf25f23091c8ef1a14cfb11ed9379ffbaed90.tar.gz |
Comment on what an "enumeration" type is
Diffstat (limited to 'compiler/iface/BuildTyCl.lhs')
-rw-r--r-- | compiler/iface/BuildTyCl.lhs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/iface/BuildTyCl.lhs b/compiler/iface/BuildTyCl.lhs index de57feb928..4319d1fc18 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 - -- <mod>_<type>_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 |