diff options
author | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-06-22 12:51:49 +0200 |
---|---|---|
committer | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-06-30 22:37:49 +0200 |
commit | 3eb96a6bbc1f61b81c20df882e243c4d9f4a9404 (patch) | |
tree | 73663edd3a6318380e2bc925d52c55d74fc3b013 /haddock-api | |
parent | ce4b5607f84506e5aafd1994e02300c2e3ee475d (diff) |
Extend module interface with rich source token stream field.
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 1 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 7491a01e..63d44366 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -145,6 +145,7 @@ createInterface tm flags modMap instIfaceMap = do , ifaceFamInstances = fam_instances , ifaceHaddockCoverage = coverage , ifaceWarningMap = warningMap + , ifaceTokenizedSrc = Nothing } mkAliasMap :: DynFlags -> Maybe RenamedSource -> M.Map Module ModuleName diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index 14995098..fbb5f44c 100644 --- a/haddock-api/src/Haddock/Types.hs +++ b/haddock-api/src/Haddock/Types.hs @@ -35,6 +35,7 @@ import DynFlags (ExtensionFlag, Language) import OccName import Outputable import Control.Monad (ap) +import Haddock.Backends.Hyperlinker.Ast ----------------------------------------------------------------------------- -- * Convenient synonyms @@ -125,6 +126,10 @@ data Interface = Interface -- | Warnings for things defined in this module. , ifaceWarningMap :: !WarningMap + + -- | Tokenized source code of module (avaliable if Haddock is invoked with + -- source generation flag). + , ifaceTokenizedSrc :: !(Maybe [RichToken]) } type WarningMap = Map Name (Doc Name) |