blob: abd3ca2b57939d29ed33d340914153e6ebf27091 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
module Haddock.Backends.Hyperlinker.Ast where
import qualified GHC
import Haddock.Backends.Hyperlinker.Parser
data RichToken = RichToken
{ rtkToken :: Token
, rtkName :: Maybe GHC.Name
}
enrich :: GHC.RenamedSource -> [Token] -> [RichToken]
enrich src =
map $ \token -> RichToken
{ rtkToken = token
, rtkName = lookupName src $ tkSpan token
}
lookupName :: GHC.RenamedSource -> Span -> Maybe GHC.Name
lookupName = undefined
|