summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-03-01 09:55:25 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-03-01 09:55:25 +0000
commita251cba370c9bfb291159c4deea20226a87eeac3 (patch)
tree4f0c8996ea61e6a66553539299a8183adca9ecd0 /compiler/iface
parent789690fc23a49aa3bcbc946992fd6340c90d8c10 (diff)
downloadhaskell-a251cba370c9bfb291159c4deea20226a87eeac3.tar.gz
expand comments for #2578 fix
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/BuildTyCl.lhs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/iface/BuildTyCl.lhs b/compiler/iface/BuildTyCl.lhs
index 54adfdf84c..de1c1915a6 100644
--- a/compiler/iface/BuildTyCl.lhs
+++ b/compiler/iface/BuildTyCl.lhs
@@ -121,7 +121,12 @@ mkDataTyConRhs cons
= DataTyCon {
data_cons = cons,
is_enum = -- We define datatypes with no constructors to not be
- -- enumerations; this fixes trac #2578
+ -- 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) &&
all isNullarySrcDataCon cons
}