aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorIsaac Dupree <id@isaac.cedarswampstudios.org>2009-08-23 03:08:03 +0000
committerIsaac Dupree <id@isaac.cedarswampstudios.org>2009-08-23 03:08:03 +0000
commit70945271f1f4deab363c1acfef3ce51a1b7f617d (patch)
tree81d518f2ca4dde1a1c72072b8a67290de2952388 /src/Main.hs
parent9dc98d20af5bbcb8bff7624b3d8c4d840ed6bb4e (diff)
Move doc parsing/lexing into Haddock for ghc>=6.11
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 465ebfd8..8d6db877 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -22,6 +22,8 @@ module Main (main) where
import Haddock.Backends.Html
import Haddock.Backends.Hoogle
import Haddock.Interface
+import Haddock.Interface.Lex
+import Haddock.Interface.Parse
import Haddock.Types
import Haddock.Version
import Haddock.InterfaceFile
@@ -469,9 +471,9 @@ getPrologue flags =
[] -> return Nothing
[filename] -> do
str <- readFile filename
- case parseHaddockComment str of
- Left err -> throwE err
- Right doc -> return (Just doc)
+ case parseHaddockParagraphs (tokenise str) of
+ Nothing -> throwE "parsing haddock prologue failed"
+ Just doc -> return (Just doc)
_otherwise -> throwE "multiple -p/--prologue options"