From a45a133af1f25ce60a8d1b0750c8f3ce452129d6 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 16 Dec 2015 05:40:17 -0500 Subject: Types: Add Outputable[Bndr] DocName instances --- haddock-api/src/Haddock/Types.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'haddock-api/src/Haddock') 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 -- cgit v1.2.3