aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-12-16 05:40:17 -0500
committerBen Gamari <ben@smart-cactus.org>2015-12-16 17:54:55 +0100
commita45a133af1f25ce60a8d1b0750c8f3ce452129d6 (patch)
treebaf3bfe5bc3d8137ff0090feadf9981d9bc9b664 /haddock-api
parent85be6fdc7832eae3afd141229c8ac3475da8f542 (diff)
Types: Add Outputable[Bndr] DocName instances
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Types.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index 914f00f2..b837970b 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -301,6 +301,14 @@ instance NamedThing DocName where
getName (Documented name _) = name
getName (Undocumented name) = name
+-- | Useful for debugging
+instance Outputable DocName where
+ ppr = ppr . getName
+
+instance OutputableBndr DocName where
+ pprBndr _ = ppr . getName
+ pprPrefixOcc = pprPrefixOcc . getName
+ pprInfixOcc = pprInfixOcc . getName
class NamedThing name => SetName name where