tasty-1.2.2: Modern and extensible testing framework

Safe HaskellNone
LanguageHaskell2010

Test.Tasty.Patterns.Parser

Description

Synopsis

Documentation

data Parser a Source #

A separate Parser data type ensures that we don't forget to skip spaces.

Instances
Monad Parser Source # 
Instance details

Defined in Test.Tasty.Patterns.Parser

Methods

(>>=) :: Parser a -> (a -> Parser b) -> Parser b #

(>>) :: Parser a -> Parser b -> Parser b #

return :: a -> Parser a #

fail :: String -> Parser a #

Functor Parser Source # 
Instance details

Defined in Test.Tasty.Patterns.Parser

Methods

fmap :: (a -> b) -> Parser a -> Parser b #

(<$) :: a -> Parser b -> Parser a #

Applicative Parser Source # 
Instance details

Defined in Test.Tasty.Patterns.Parser

Methods

pure :: a -> Parser a #

(<*>) :: Parser (a -> b) -> Parser a -> Parser b #

liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c #

(*>) :: Parser a -> Parser b -> Parser b #

(<*) :: Parser a -> Parser b -> Parser a #

Alternative Parser Source # 
Instance details

Defined in Test.Tasty.Patterns.Parser

Methods

empty :: Parser a #

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

MonadPlus Parser Source # 
Instance details

Defined in Test.Tasty.Patterns.Parser

Methods

mzero :: Parser a #

mplus :: Parser a -> Parser a -> Parser a #

runParser Source #

Arguments

:: Parser a 
-> String

text to parse

-> ParseResult a 

Run a parser

data ParseResult a Source #

Constructors

Success a 
Invalid 
Ambiguous [a] 
Instances
Show a => Show (ParseResult a) Source # 
Instance details

Defined in Test.Tasty.Patterns.Parser

expr :: Parser Expr Source #

The awk-like expression parser

parseAwkExpr :: String -> Maybe Expr Source #

Parse an awk expression