From d6bf82afe4675e47a489087a375a52178d68f317 Mon Sep 17 00:00:00 2001 From: David Waern Date: Mon, 10 Nov 2008 01:29:14 +0000 Subject: Make DocName an instance of NamedThing --- src/Haddock/DocName.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Haddock/DocName.hs') diff --git a/src/Haddock/DocName.hs b/src/Haddock/DocName.hs index 5bb3c4bb..a3a92b5d 100644 --- a/src/Haddock/DocName.hs +++ b/src/Haddock/DocName.hs @@ -19,6 +19,13 @@ data DocName = Documented Name Module | Undocumented Name deriving Eq +-- TODO: remove docNameOrig in favour of the NamedThing instance + +instance NamedThing DocName where + getName (Documented name _) = name + getName (Undocumented name) = name + + -- | The 'OccName' belonging to this name docNameOcc :: DocName -> OccName docNameOcc = nameOccName . docNameOrig -- cgit v1.2.3