summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2017-01-30 11:59:11 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-30 14:02:34 -0500
commit5f8e23444caf7a3d085cd8d97762dc3ed777c297 (patch)
tree11e18367b9a2990279ad485537828c1563b6e541
parentf41c27d3ffdddbb1afe07de1bd25205061194c93 (diff)
downloadhaskell-5f8e23444caf7a3d085cd8d97762dc3ed777c297.tar.gz
Print COMPLETE pragmas in --show-iface
Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3032
-rw-r--r--compiler/iface/IfaceSyn.hs4
-rw-r--r--compiler/iface/LoadIface.hs1
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs
index 7a1d427397..d4dd51e1b7 100644
--- a/compiler/iface/IfaceSyn.hs
+++ b/compiler/iface/IfaceSyn.hs
@@ -298,6 +298,10 @@ type IfaceAnnTarget = AnnTarget OccName
data IfaceCompleteMatch = IfaceCompleteMatch [IfExtName] IfExtName
+instance Outputable IfaceCompleteMatch where
+ ppr (IfaceCompleteMatch cls ty) = text "COMPLETE" <> colon <+> ppr cls
+ <+> dcolon <+> ppr ty
+
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index 7c138c473d..75f2b6a24d 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -1011,6 +1011,7 @@ pprModIface iface
, ppr (mi_warns iface)
, pprTrustInfo (mi_trust iface)
, pprTrustPkg (mi_trust_pkg iface)
+ , vcat (map ppr (mi_complete_sigs iface))
]
where
pp_hsc_src HsBootFile = text "[boot]"