add the constructor name field to the info table for RTS constructors
[ghc-hetmet.git] / compiler / codeGen / CgInfoTbls.hs
index fed5d80..0d6925b 100644 (file)
@@ -21,7 +21,7 @@ module CgInfoTbls (
        getConstrTag,
        infoTable, infoTableClosureType,
        infoTablePtrs, infoTableNonPtrs,
-       funInfoTable
+       funInfoTable, makeRelativeRefTo
   ) where
 
 
@@ -89,7 +89,8 @@ emitClosureCodeAndInfoTable cl_info args body
 
         ; conName <-  
              if is_con
-                then mkStringCLit $ fromJust conIdentity
+                then do cstr <- mkStringCLit $ fromJust conIdentity
+                        return (makeRelativeRefTo info_lbl cstr)
                 else return (mkIntCLit 0)
 
        ; emitInfoTableAndCode info_lbl std_info (extra_bits conName) args blks }