aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock.hs
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-05-06 13:39:23 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-05-06 13:50:31 +0200
commite8756e5bfcd128817b7942cb439ee3287dd0637a (patch)
tree3f40b20693c69a09573a86d8ebd675a438623f45 /src/Haddock.hs
parent70ce2cbf11ea6c861b5597527f768039d0571bf2 (diff)
Remove no longer necessary parser error handling.
We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places.
Diffstat (limited to 'src/Haddock.hs')
-rw-r--r--src/Haddock.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Haddock.hs b/src/Haddock.hs
index 78844c96..3d049b18 100644
--- a/src/Haddock.hs
+++ b/src/Haddock.hs
@@ -448,11 +448,8 @@ getPrologue dflags flags =
[filename] -> withFile filename ReadMode $ \h -> do
hSetEncoding h utf8
str <- hGetContents h
- case parseParasMaybe dflags str of
- Nothing ->
- throwE $ "failed to parse haddock prologue from file: " ++ filename
- Just doc -> return (Just doc)
- _otherwise -> throwE "multiple -p/--prologue options"
+ return . Just $ parseParas dflags str
+ _ -> throwE "multiple -p/--prologue options"
#ifdef IN_GHC_TREE