Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Control.Monad.Parser.Class
- newtype ParserT s m a = ParserT {
- runParserT :: s -> m (ParseResult a s)
- data ParseResult v s
- = Parsed v s (ParseError (Pos s))
- | NoParse (ParseError (Pos s))
- data ParseError p = ParseError p [ErrorDesc]
- data ErrorDesc
- type Parser s a = ParserT s Identity a
- type StringParser a = Parser StringLines a
- type ParserOf i p = (MonadParser p, Item (Input p) ~ i)
- type CharParser p = ParserOf Char p
- runParser :: Parser s a -> s -> ParseResult a s
- runStringParser :: StringParser a -> String -> ParseResult a StringLines
- runTextParser :: TextParser a -> Text -> ParseResult a TextLines
Documentation
module Control.Monad.Parser.Class
newtype ParserT s m a Source #
Parser monad transformer.
ParserT | |
|
Instances
data ParseResult v s Source #
Parsed v s (ParseError (Pos s)) | |
NoParse (ParseError (Pos s)) |
Instances
(Show v, Show (Pos s)) => Show (ParseResult v s) Source # | |
Defined in Control.Monad.Trans.Parser showsPrec :: Int -> ParseResult v s -> ShowS # show :: ParseResult v s -> String # showList :: [ParseResult v s] -> ShowS # |
data ParseError p Source #
ParseError p [ErrorDesc] |
Instances
Show p => Show (ParseError p) Source # | |
Defined in Control.Monad.Trans.Parser showsPrec :: Int -> ParseError p -> ShowS # show :: ParseError p -> String # showList :: [ParseError p] -> ShowS # |
type StringParser a = Parser StringLines a Source #
type CharParser p = ParserOf Char p Source #
runParser :: Parser s a -> s -> ParseResult a s Source #
runStringParser :: StringParser a -> String -> ParseResult a StringLines Source #
runTextParser :: TextParser a -> Text -> ParseResult a TextLines Source #