diff options
author | Ćukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-03 15:54:18 +0200 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-08-21 18:22:33 +0100 |
commit | e46cf071f018a1145ed96c463375c42d40382e35 (patch) | |
tree | 046859feb197be4c1c931710ff7f39aaaf2cd294 /haddock-api | |
parent | 2f0d25e3d3f15b05f904fd3ca74e567f2fec4b93 (diff) |
Move `InstOrigin` type declaration to more appropriate module.
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 13 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 18 |
2 files changed, 18 insertions, 13 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 20ca8e2b..e536ae4b 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -534,19 +534,6 @@ ppClassDecl summary links instances fixities loc d subdocs ppClassDecl _ _ _ _ _ _ _ _ _ _ _ = error "declaration type not supported by ppShortClassDecl" -data InstOrigin name - = OriginClass name - | OriginData name - | OriginFamily name - - -instance NamedThing name => NamedThing (InstOrigin name) where - - getName (OriginClass name) = getName name - getName (OriginData name) = getName name - getName (OriginFamily name) = getName name - - ppInstances :: LinksInfo -> InstOrigin DocName -> [DocInstance DocName] -> Splice -> Unicode -> Qualification diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index 1f074ac3..106d3544 100644 --- a/haddock-api/src/Haddock/Types.hs +++ b/haddock-api/src/Haddock/Types.hs @@ -384,6 +384,24 @@ data InstHead name = InstHead , ihdInstType :: InstType name } + +-- | An instance origin information. +-- +-- This is used primarily in HTML backend to generate unique instance +-- identifiers (for expandable sections). +data InstOrigin name + = OriginClass name + | OriginData name + | OriginFamily name + + +instance NamedThing name => NamedThing (InstOrigin name) where + + getName (OriginClass name) = getName name + getName (OriginData name) = getName name + getName (OriginFamily name) = getName name + + ----------------------------------------------------------------------------- -- * Documentation comments ----------------------------------------------------------------------------- |