From 70945271f1f4deab363c1acfef3ce51a1b7f617d Mon Sep 17 00:00:00 2001 From: Isaac Dupree Date: Sun, 23 Aug 2009 03:08:03 +0000 Subject: Move doc parsing/lexing into Haddock for ghc>=6.11 --- src/Main.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Main.hs') 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" -- cgit v1.2.3