aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/ParseModuleHeader.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-04-07 17:05:20 +0000
committerDavid Waern <david.waern@gmail.com>2010-04-07 17:05:20 +0000
commitae37c71b42a81ad52b96eda5a765b6ade8dfd291 (patch)
tree80c92b784a7b37b5e8942aeb618b10edeceb5149 /src/Haddock/Interface/ParseModuleHeader.hs
parentb5ec4e7d0f847215677752b191677379f045efb0 (diff)
Propagate source positions from Lex.x to Parse.y
Diffstat (limited to 'src/Haddock/Interface/ParseModuleHeader.hs')
-rw-r--r--src/Haddock/Interface/ParseModuleHeader.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Haddock/Interface/ParseModuleHeader.hs b/src/Haddock/Interface/ParseModuleHeader.hs
index dc701f36..2bdd30a7 100644
--- a/src/Haddock/Interface/ParseModuleHeader.hs
+++ b/src/Haddock/Interface/ParseModuleHeader.hs
@@ -46,13 +46,15 @@ parseModuleHeader str0 =
description1 :: Either String (Maybe (Doc RdrName))
description1 = case descriptionOpt of
Nothing -> Right Nothing
- Just description -> case parseString . tokenise $ description of
+ -- TODO: pass real file position
+ Just description -> case parseString $ tokenise description (0,0) of
Nothing -> Left ("Cannot parse Description: " ++ description)
Just doc -> Right (Just doc)
in
case description1 of
Left mess -> Left mess
- Right docOpt -> case parseParas . tokenise $ str8 of
+ -- TODO: pass real file position
+ Right docOpt -> case parseParas $ tokenise str8 (0,0) of
Nothing -> Left "Cannot parse header documentation paragraphs"
Just doc -> Right (HaddockModInfo {
hmi_description = docOpt,