diff options
Diffstat (limited to 'src/Haddock/DocName.hs')
-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 |