summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Iface/Tidy/StaticPtrTable.hs')
-rw-r--r--compiler/GHC/Iface/Tidy/StaticPtrTable.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Iface/Tidy/StaticPtrTable.hs b/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
index 0606728900..0a61f63aed 100644
--- a/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
+++ b/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
@@ -148,6 +148,7 @@ import GHC.Linker.Types
import GHC.Types.Name
import GHC.Types.Id
import GHC.Types.TyThing
+import GHC.Types.ForeignStubs
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State
@@ -264,9 +265,9 @@ sptCreateStaticBinds hsc_env this_mod binds
--
-- @fps@ is a list associating each binding corresponding to a static entry with
-- its fingerprint.
-sptModuleInitCode :: Platform -> Module -> [SptEntry] -> SDoc
-sptModuleInitCode _ _ [] = Outputable.empty
-sptModuleInitCode platform this_mod entries = vcat
+sptModuleInitCode :: Platform -> Module -> [SptEntry] -> CStub
+sptModuleInitCode _ _ [] = mempty
+sptModuleInitCode platform this_mod entries = CStub $ vcat
[ text "static void hs_spt_init_" <> ppr this_mod
<> text "(void) __attribute__((constructor));"
, text "static void hs_spt_init_" <> ppr this_mod <> text "(void)"