Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type SimpleStringParser a = Parsec CustomErr String a
- type SimpleTextParser = Parsec CustomErr Text
- type TextParser m a = ParsecT CustomErr Text m a
- type JournalParser m a = StateT Journal (ParsecT CustomErr Text m) a
- choice' :: [TextParser m a] -> TextParser m a
- choiceInState :: [StateT s (ParsecT CustomErr Text m) a] -> StateT s (ParsecT CustomErr Text m) a
- surroundedBy :: Applicative m => m openclose -> m a -> 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 CustomErr Text m) a -> Text -> m (Either (ParseError Char CustomErr) 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
- showDateParseError :: (Show t, Show e) => ParseError t e -> String
- nonspace :: TextParser m Char
- isNonNewlineSpace :: Char -> Bool
- spacenonewline :: (Stream s, Char ~ Token s) => ParsecT CustomErr s m Char
- restofline :: TextParser m String
- eolof :: TextParser m ()
- data CustomErr
Documentation
type JournalParser m a = StateT Journal (ParsecT CustomErr Text m) a Source #
A parser of text in some monad, with a journal as state.
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 CustomErr Text m) a] -> StateT s (ParsecT CustomErr Text m) a Source #
Backtracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail.
surroundedBy :: Applicative m => m openclose -> m a -> m a Source #
parsewithString :: Parsec e String a -> String -> Either (ParseError Char e) a Source #
parseWithState :: Monad m => st -> StateT st (ParsecT CustomErr Text m) a -> Text -> m (Either (ParseError Char CustomErr) 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 #
showDateParseError :: (Show t, Show e) => ParseError t e -> String Source #
nonspace :: TextParser m Char Source #
isNonNewlineSpace :: Char -> Bool Source #
restofline :: TextParser m String Source #
eolof :: TextParser m () Source #
re-exports
A custom error type for the parser. The type is specialized to
parsers of Text
streams.