aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-11-10 01:29:14 +0000
committerDavid Waern <david.waern@gmail.com>2008-11-10 01:29:14 +0000
commitd6bf82afe4675e47a489087a375a52178d68f317 (patch)
treecd22c59052eb5f3bf0dafe7b954ca4c76d430c92 /src/Haddock
parent3c0e7dbe95ba23d616cc94d7f641a9cf0ab49758 (diff)
Make DocName an instance of NamedThing
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/DocName.hs7
1 files changed, 7 insertions, 0 deletions
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