Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit 39fea0f

Browse files
authored
Merge pull request #1320 from haskell/alex/fix
Remove dubious parseModLink
2 parents 9dab3bd + 2f34d12 commit 39fea0f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

haddock-api/src/Haddock/InterfaceFile.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ import GHC.Types.Unique.FM
4646
import GHC.Types.Unique.Supply
4747
import GHC.Types.Unique
4848

49-
import Documentation.Haddock.Parser (parseModLink)
50-
51-
5249
data InterfaceFile = InterfaceFile {
5350
ifLinkEnv :: LinkEnv,
5451
ifInstalledIfaces :: [InstalledInterface]
@@ -625,7 +622,10 @@ instance (Binary mod, Binary id) => Binary (DocH mod id) where
625622
-- See note [The DocModule story]
626623
5 -> do
627624
af <- get bh
628-
return (parseModLink af)
625+
return $ DocModule ModLink
626+
{ modLinkName = af
627+
, modLinkLabel = Nothing
628+
}
629629
6 -> do
630630
ag <- get bh
631631
return (DocEmphasis ag)

haddock-library/src/Documentation/Haddock/Parser.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
module Documentation.Haddock.Parser (
1919
parseString,
2020
parseParas,
21-
parseModLink,
2221
overIdentifier,
2322
toRegular,
2423
Identifier
@@ -137,9 +136,6 @@ parseString = parseText . T.pack
137136
parseText :: Text -> DocH mod Identifier
138137
parseText = parseParagraph . T.dropWhile isSpace . T.filter (/= '\r')
139138

140-
parseModLink :: String -> DocH mod id
141-
parseModLink s = snd $ parse moduleName (T.pack s)
142-
143139
parseParagraph :: Text -> DocH mod Identifier
144140
parseParagraph = snd . parse p
145141
where

0 commit comments

Comments
 (0)