diff options
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 8 |
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" |