Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type SimpleStringParser a = Parsec MPErr String a
- type SimpleTextParser = Parsec MPErr Text
- type TextParser m a = ParsecT MPErr Text m a
- type JournalParser m a = StateT Journal (ParsecT MPErr Text m) a
- type ErroringJournalParser m a = StateT Journal (ParsecT MPErr Text (ExceptT String m)) a
- choice' :: [TextParser m a] -> TextParser m a
- choiceInState :: [StateT s (ParsecT MPErr Text m) a] -> StateT s (ParsecT MPErr Text m) a
- parsewith :: Parsec e Text a -> Text -> Either (ParseError Char e) a
- parsewithString :: Parsec e String a -> String -> Either (ParseError Char e) a
- parseWithState :: Monad m => st -> StateT st (ParsecT MPErr Text m) a -> Text -> m (Either (ParseError Char MPErr) a)
- parseWithState' :: Stream s => st -> StateT st (ParsecT e s Identity) a -> s -> Either (ParseError (Token s) e) a
- fromparse :: (Show t, Show e) => Either (ParseError t e) a -> a
- parseerror :: (Show t, Show e) => ParseError t e -> a
- showParseError :: (Show t, Show e) => ParseError t e -> String
- showDateParseError :: (Show t, Show e) => ParseError t e -> String
- nonspace :: TextParser m Char
- spacenonewline :: (Stream s, Char ~ Token s) => ParsecT MPErr s m Char
- restofline :: TextParser m String
- eolof :: TextParser m ()
Documentation
type JournalParser m a = StateT Journal (ParsecT MPErr Text m) a Source #
A parser of text in some monad, with a journal as state.
type ErroringJournalParser m a = StateT Journal (ParsecT MPErr Text (ExceptT String m)) a Source #
A parser of text in some monad, with a journal as state, that can throw an error string mid-parse.
choice' :: [TextParser m a] -> TextParser m a Source #
Backtracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail.
choiceInState :: [StateT s (ParsecT MPErr Text m) a] -> StateT s (ParsecT MPErr Text m) a Source #
Backtracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail.
parsewithString :: Parsec e String a -> String -> Either (ParseError Char e) a Source #
parseWithState :: Monad m => st -> StateT st (ParsecT MPErr Text m) a -> Text -> m (Either (ParseError Char MPErr) a) Source #
parseWithState' :: Stream s => st -> StateT st (ParsecT e s Identity) a -> s -> Either (ParseError (Token s) e) a Source #
parseerror :: (Show t, Show e) => ParseError t e -> a Source #
showParseError :: (Show t, Show e) => ParseError t e -> String Source #
showDateParseError :: (Show t, Show e) => ParseError t e -> String Source #
nonspace :: TextParser m Char Source #
restofline :: TextParser m String Source #
eolof :: TextParser m () Source #