projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
789690f
)
expand comments for #2578 fix
author
Simon Marlow
<marlowsd@gmail.com>
Mon, 1 Mar 2010 09:55:25 +0000
(09:55 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Mon, 1 Mar 2010 09:55:25 +0000
(09:55 +0000)
compiler/iface/BuildTyCl.lhs
patch
|
blob
|
history
diff --git
a/compiler/iface/BuildTyCl.lhs
b/compiler/iface/BuildTyCl.lhs
index
54adfdf
..
de1c191
100644
(file)
--- 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
}