summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToJS/Object.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/StgToJS/Object.hs')
-rw-r--r--compiler/GHC/StgToJS/Object.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/GHC/StgToJS/Object.hs b/compiler/GHC/StgToJS/Object.hs
index 11e62e2eb1..a7d79d6a7b 100644
--- a/compiler/GHC/StgToJS/Object.hs
+++ b/compiler/GHC/StgToJS/Object.hs
@@ -124,6 +124,7 @@ import GHC.Data.FastString
import GHC.Data.ShortText as ST
import GHC.Utils.Misc
+import GHC.Utils.Outputable (ppr, Outputable, hcat, vcat, text)
data Header = Header
{ hdrModuleName :: !BS.ByteString
@@ -194,6 +195,12 @@ data ExportedFun = ExportedFun
, funSymbol :: !ShortText
} deriving (Eq, Ord)
+instance Outputable ExportedFun where
+ ppr (ExportedFun m f) = vcat
+ [ hcat [ text "module: ", pprModule m ]
+ , hcat [ text "symbol: ", ppr f ]
+ ]
+
-- we need to store the size separately, since getting a HashMap's size is O(n)
data SymbolTable
= SymbolTable !Int !(Map ShortText Int)