Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module exposes internals of the package: its API may change independently of the PVP-compliant version number.
Synopsis
- newtype Parser a = Parser {
- unParser :: forall r. (a -> ErrorInfo -> r) -> (a -> ErrorInfo -> Position -> Highlights -> r) -> (ErrorInfo -> r) -> (ErrorInfo -> Position -> Highlights -> r) -> Position -> Highlights -> Text -> r
- manyAccum :: (a -> [a] -> [a]) -> Parser a -> Parser [a]
- runParser :: Parser a -> Text -> FilePath -> Position -> Result (a, Position, Highlights)
- parseFromFile :: MonadIO m => Parser a -> FilePath -> m (Maybe a)
- parseFromFileEx :: MonadIO m => Parser a -> FilePath -> m (Result a)
- parseText :: Parser a -> Text -> FilePath -> Result a
- parseString :: Parser a -> String -> FilePath -> Result a
- parseTest :: (MonadIO m, Show a) => Parser a -> String -> m ()
Documentation
Parser | |
|
Instances
Monad Parser Source # | |
Functor Parser Source # | |
MonadFail Parser Source # | |
Defined in Text.Parsix.Parser.Internal | |
Applicative Parser Source # | |
Alternative Parser Source # | |
MonadPlus Parser Source # | |
TokenParsing Parser Source # | |
LookAheadParsing Parser Source # | |
Defined in Text.Parsix.Parser.Internal | |
CharParsing Parser Source # | |
Parsing Parser Source # | |
RecoveryParsing Parser Source # | |
Defined in Text.Parsix.Combinators | |
SliceParsing Parser Source # | |
Semigroup a => Semigroup (Parser a) Source # | |
Monoid a => Monoid (Parser a) Source # | |
parseText :: Parser a -> Text -> FilePath -> Result a Source #
parseText p i file
runs a parser p
on i
. file
is only used for
reporting errors.