diff options
author | Ben Gamari <ben@smart-cactus.org> | 2015-12-16 05:40:17 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-12-16 05:40:17 -0500 |
commit | 91217a9642962476a736f6179d0803ddb787c2b9 (patch) | |
tree | 0363763172fc33c993705c82be1a826da92a920e /haddock-api | |
parent | d4657f07912416a1b14ddb517696f8ef3ffb85a7 (diff) |
Types: Add Outputable[Bndr] DocName instances
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index 6305dba1..6f9b64dd 100644 --- a/haddock-api/src/Haddock/Types.hs +++ b/haddock-api/src/Haddock/Types.hs @@ -286,6 +286,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 ----------------------------------------------------------------------------- -- * Instances |