diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Haddock')
-rw-r--r-- | src/Text/Pandoc/Readers/Haddock/Lex.x | 3 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Haddock/Parse.y | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock/Lex.x b/src/Text/Pandoc/Readers/Haddock/Lex.x index 902ac84c0..9d686c885 100644 --- a/src/Text/Pandoc/Readers/Haddock/Lex.x +++ b/src/Text/Pandoc/Readers/Haddock/Lex.x @@ -19,7 +19,8 @@ module Text.Pandoc.Readers.Haddock.Lex ( Token(..), LToken, - tokenise + tokenise, + tokenPos ) where import Data.Char diff --git a/src/Text/Pandoc/Readers/Haddock/Parse.y b/src/Text/Pandoc/Readers/Haddock/Parse.y index 26d7c287d..c45e09113 100644 --- a/src/Text/Pandoc/Readers/Haddock/Parse.y +++ b/src/Text/Pandoc/Readers/Haddock/Parse.y @@ -46,7 +46,7 @@ import Data.Sequence (viewr, ViewR(..)) PARA { (TokPara,_) } STRING { (TokString $$,_) } -%monad { Maybe } +%monad { Either [LToken] } %name parseParas doc %name parseString seq @@ -126,8 +126,8 @@ strings :: { String } | STRING strings { $1 ++ $2 } { -happyError :: [LToken] -> Maybe a -happyError toks = Nothing +happyError :: [LToken] -> Either [LToken] a +happyError toks = Left toks para' :: Inlines -> Blocks para' (Many ils) = |