expand comments for #2578 fix
authorSimon Marlow <marlowsd@gmail.com>
Mon, 1 Mar 2010 09:55:25 +0000 (09:55 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 1 Mar 2010 09:55:25 +0000 (09:55 +0000)
compiler/iface/BuildTyCl.lhs

index 54adfdf..de1c191 100644 (file)
@@ -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
     }