diff options
author | David Waern <david.waern@gmail.com> | 2008-11-10 01:29:14 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-11-10 01:29:14 +0000 |
commit | d6bf82afe4675e47a489087a375a52178d68f317 (patch) | |
tree | cd22c59052eb5f3bf0dafe7b954ca4c76d430c92 | |
parent | 3c0e7dbe95ba23d616cc94d7f641a9cf0ab49758 (diff) |
Make DocName an instance of NamedThing
-rw-r--r-- | src/Haddock/DocName.hs | 7 |
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 |