parsec-free-3.1.11.7: Parsec API encoded as a deeply-embedded DSL, for debugging and analysis
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Parsec.Free

Documentation

newtype ParsecDSL s u m a Source #

Constructors

ParsecDSL 

Fields

Instances

Instances details
MonadError e m => MonadError e (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

throwError :: e -> ParsecDSL s u m a #

catchError :: ParsecDSL s u m a -> (e -> ParsecDSL s u m a) -> ParsecDSL s u m a #

MonadReader r m => MonadReader r (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

ask :: ParsecDSL s u m r #

local :: (r -> r) -> ParsecDSL s u m a -> ParsecDSL s u m a #

reader :: (r -> a) -> ParsecDSL s u m a #

MonadState s m => MonadState s (ParsecDSL s' u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

get :: ParsecDSL s' u m s #

put :: s -> ParsecDSL s' u m () #

state :: (s -> (a, s)) -> ParsecDSL s' u m a #

MonadTrans (ParsecDSL s u) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

lift :: Monad m => m a -> ParsecDSL s u m a #

MonadFail (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

fail :: String -> ParsecDSL s u m a #

MonadIO m => MonadIO (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

liftIO :: IO a -> ParsecDSL s u m a #

Alternative (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

empty :: ParsecDSL s u m a #

(<|>) :: ParsecDSL s u m a -> ParsecDSL s u m a -> ParsecDSL s u m a #

some :: ParsecDSL s u m a -> ParsecDSL s u m [a] #

many :: ParsecDSL s u m a -> ParsecDSL s u m [a] #

Applicative (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

pure :: a -> ParsecDSL s u m a #

(<*>) :: ParsecDSL s u m (a -> b) -> ParsecDSL s u m a -> ParsecDSL s u m b #

liftA2 :: (a -> b -> c) -> ParsecDSL s u m a -> ParsecDSL s u m b -> ParsecDSL s u m c #

(*>) :: ParsecDSL s u m a -> ParsecDSL s u m b -> ParsecDSL s u m b #

(<*) :: ParsecDSL s u m a -> ParsecDSL s u m b -> ParsecDSL s u m a #

Functor (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

fmap :: (a -> b) -> ParsecDSL s u m a -> ParsecDSL s u m b #

(<$) :: a -> ParsecDSL s u m b -> ParsecDSL s u m a #

Monad (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

(>>=) :: ParsecDSL s u m a -> (a -> ParsecDSL s u m b) -> ParsecDSL s u m b #

(>>) :: ParsecDSL s u m a -> ParsecDSL s u m b -> ParsecDSL s u m b #

return :: a -> ParsecDSL s u m a #

MonadPlus (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

mzero :: ParsecDSL s u m a #

mplus :: ParsecDSL s u m a -> ParsecDSL s u m a -> ParsecDSL s u m a #

MonadCont m => MonadCont (ParsecDSL s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

callCC :: ((a -> ParsecDSL s u m b) -> ParsecDSL s u m a) -> ParsecDSL s u m a #

data ParsecF s u m r Source #

Constructors

forall a. Plifted (ParsecT s u m a) (a -> r) 
Preturn r 
Pbind r 
forall a. Peffect (m a) (a -> r) 
forall a. Pquiet (ParsecDSL s u m a) (a -> r) 
PgetState (u -> r) 
PputState u r 
PmodifyState (u -> u) r 
PgetPosition (SourcePos -> r) 
PsetPosition SourcePos r 
PgetInput (s -> r) 
PsetInput s r 
PgetParserState (State s u -> r) 
PsetParserState (State s u) (State s u -> r) 
PupdateParserState (State s u -> State s u) (State s u -> r) 
forall t.(Stream s m t, Eq t) => Ptokens ([t] -> String) (SourcePos -> [t] -> SourcePos) [t] ([t] -> r) 
forall t a.Stream s m t => PtokenPrimEx (t -> String) (SourcePos -> t -> s -> SourcePos) (Maybe (SourcePos -> t -> s -> u -> u)) (t -> Maybe a) (a -> r) 
Stream s m Char => PalphaNum (Char -> r) 
Stream s m Char => PanyChar (Char -> r) 
forall t.(Show t, Stream s m t) => PanyToken (t -> r) 
Stream s m Char => Pchar Char r 
Stream s m Char => Pcrlf (Char -> r) 
Stream s m Char => Pdigit (Char -> r) 
Stream s m Char => PendOfLine (Char -> r) 
forall t.(Show t, Stream s m t) => Peof r 
Stream s m Char => PhexDigit (Char -> r) 
Stream s m Char => Pletter (Char -> r) 
Stream s m Char => Plower (Char -> r) 
Stream s m Char => Pnewline (Char -> r) 
Stream s m Char => PnoneOf [Char] (Char -> r) 
Stream s m Char => PoctDigit (Char -> r) 
Stream s m Char => PoneOf [Char] (Char -> r) 
PparserFail String 
PparserZero 
Stream s m Char => Psatisfy (Char -> Bool) (Char -> r) 
Stream s m Char => Pspace (Char -> r) 
Stream s m Char => Pspaces r 
Stream s m Char => Pstring String r 
Stream s m Char => Ptab (Char -> r) 
Stream s m Char => Pupper (Char -> r) 
Punexpected String 
forall a. PparserPlus (ParsecDSL s u m a) (ParsecDSL s u m a) (a -> r) 
forall a. Plabel (ParsecDSL s u m a) String (a -> r) 
forall a. Plabels (ParsecDSL s u m a) [String] (a -> r) 
forall a. Ptry (ParsecDSL s u m a) (a -> r) 
forall a. Pchainl (ParsecDSL s u m a) (ParsecDSL s u m (a -> a -> a)) a (a -> r) 
forall a. Pchainl1 (ParsecDSL s u m a) (ParsecDSL s u m (a -> a -> a)) (a -> r) 
forall a. Pchainr (ParsecDSL s u m a) (ParsecDSL s u m (a -> a -> a)) a (a -> r) 
forall a. Pchainr1 (ParsecDSL s u m a) (ParsecDSL s u m (a -> a -> a)) (a -> r) 
forall a. Pchoice [ParsecDSL s u m a] (a -> r) 
forall a. Pcount Int (ParsecDSL s u m a) ([a] -> r) 
forall a. PlookAhead (ParsecDSL s u m a) (a -> r) 
forall a. Pmany (ParsecDSL s u m a) ([a] -> r) 
forall a. Pmany1 (ParsecDSL s u m a) ([a] -> r) 
forall a. PmanyAccum (a -> [a] -> [a]) (ParsecDSL s u m a) ([a] -> r) 
forall a.Show a => PnotFollowedBy (ParsecDSL s u m a) r 
forall a. Poption a (ParsecDSL s u m a) (a -> r) 
forall a. PoptionMaybe (ParsecDSL s u m a) (Maybe a -> r) 
forall a. Poptional (ParsecDSL s u m a) r 
forall a. PskipMany (ParsecDSL s u m a) r 
forall a. PskipMany1 (ParsecDSL s u m a) r 
forall end a. PmanyTill (ParsecDSL s u m a) (ParsecDSL s u m end) ([a] -> r) 
forall open close a. Pbetween (ParsecDSL s u m open) (ParsecDSL s u m close) (ParsecDSL s u m a) (a -> r) 
forall sep a. PendBy (ParsecDSL s u m a) (ParsecDSL s u m sep) ([a] -> r) 
forall sep a. PendBy1 (ParsecDSL s u m a) (ParsecDSL s u m sep) ([a] -> r) 
forall sep a. PsepBy (ParsecDSL s u m a) (ParsecDSL s u m sep) ([a] -> r) 
forall sep a. PsepBy1 (ParsecDSL s u m a) (ParsecDSL s u m sep) ([a] -> r) 
forall sep a. PsepEndBy (ParsecDSL s u m a) (ParsecDSL s u m sep) ([a] -> r) 
forall sep a. PsepEndBy1 (ParsecDSL s u m a) (ParsecDSL s u m sep) ([a] -> r) 
Pidentifier (ParsecDSL s u m String) (String -> r) 
Preserved (ParsecDSL s u m ()) String r 
Poperator (ParsecDSL s u m String) (String -> r) 
PreservedOp (ParsecDSL s u m ()) String r 
PcharLiteral (ParsecDSL s u m Char) (Char -> r) 
PstringLiteral (ParsecDSL s u m String) (String -> r) 
Pnatural (ParsecDSL s u m Integer) (Integer -> r) 
Pinteger (ParsecDSL s u m Integer) (Integer -> r) 
Pfloat (ParsecDSL s u m Double) (Double -> r) 
PnaturalOrFloat (ParsecDSL s u m (Either Integer Double)) (Either Integer Double -> r) 
Pdecimal (ParsecDSL s u m Integer) (Integer -> r) 
Phexadecimal (ParsecDSL s u m Integer) (Integer -> r) 
Poctal (ParsecDSL s u m Integer) (Integer -> r) 
Psymbol (ParsecDSL s u m String) String (String -> r) 
forall a. Plexeme (ParsecDSL s u m a) (a -> r) 
PwhiteSpace (ParsecDSL s u m ()) r 
forall a. Pparens (ParsecDSL s u m a) (a -> r) 
forall a. Pbraces (ParsecDSL s u m a) (a -> r) 
forall a. Pangles (ParsecDSL s u m a) (a -> r) 
forall a. Pbrackets (ParsecDSL s u m a) (a -> r) 
forall a. Psquares (ParsecDSL s u m a) (a -> r) 
Psemi (ParsecDSL s u m String) (String -> r) 
Pcomma (ParsecDSL s u m String) (String -> r) 
Pcolon (ParsecDSL s u m String) (String -> r) 
Pdot (ParsecDSL s u m String) (String -> r) 
forall a. PsemiSep (ParsecDSL s u m [a]) ([a] -> r) 
forall a. PsemiSep1 (ParsecDSL s u m [a]) ([a] -> r) 
forall a. PcommaSep (ParsecDSL s u m [a]) ([a] -> r) 
forall a. PcommaSep1 (ParsecDSL s u m [a]) ([a] -> r) 

Instances

Instances details
Functor (ParsecF s u m) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

fmap :: (a -> b) -> ParsecF s u m a -> ParsecF s u m b #

(<$) :: a -> ParsecF s u m b -> ParsecF s u m a #

Show (ParsecF s u m r) Source # 
Instance details

Defined in Text.Parsec.Free

Methods

showsPrec :: Int -> ParsecF s u m r -> ShowS #

show :: ParsecF s u m r -> String #

showList :: [ParsecF s u m r] -> ShowS #

liftF' :: ParsecF s u m a -> ParsecDSL s u m a Source #

lifted :: ParsecT s u m a -> ParsecDSL s u m a Source #

quiet :: ParsecDSL s u m a -> ParsecDSL s u m a Source #

putState :: u -> ParsecDSL s u m () Source #

modifyState :: (u -> u) -> ParsecDSL s u m () Source #

setInput :: s -> ParsecDSL s u m () Source #

setParserState :: State s u -> ParsecDSL s u m (State s u) Source #

updateParserState :: (State s u -> State s u) -> ParsecDSL s u m (State s u) Source #

tokens :: (Stream s m t, Eq t) => ([t] -> String) -> (SourcePos -> [t] -> SourcePos) -> [t] -> ParsecDSL s u m [t] Source #

tokenPrimEx :: Stream s m t => (t -> String) -> (SourcePos -> t -> s -> SourcePos) -> Maybe (SourcePos -> t -> s -> u -> u) -> (t -> Maybe a) -> ParsecDSL s u m a Source #

anyToken :: (Show t, Stream s m t) => ParsecDSL s u m t Source #

char :: Stream s m Char => Char -> ParsecDSL s u m Char Source #

eof :: (Show t, Stream s m t) => ParsecDSL s u m () Source #

noneOf :: Stream s m Char => [Char] -> ParsecDSL s u m Char Source #

oneOf :: Stream s m Char => [Char] -> ParsecDSL s u m Char Source #

satisfy :: Stream s m Char => (Char -> Bool) -> ParsecDSL s u m Char Source #

spaces :: Stream s m Char => ParsecDSL s u m () Source #

tab :: Stream s m Char => ParsecDSL s u m Char Source #

parserPlus :: ParsecDSL s u m a -> ParsecDSL s u m a -> ParsecDSL s u m a Source #

label :: ParsecDSL s u m a -> String -> ParsecDSL s u m a Source #

labels :: ParsecDSL s u m a -> [String] -> ParsecDSL s u m a Source #

try :: ParsecDSL s u m a -> ParsecDSL s u m a Source #

chainl :: ParsecDSL s u m a -> ParsecDSL s u m (a -> a -> a) -> a -> ParsecDSL s u m a Source #

chainl1 :: ParsecDSL s u m a -> ParsecDSL s u m (a -> a -> a) -> ParsecDSL s u m a Source #

chainr :: ParsecDSL s u m a -> ParsecDSL s u m (a -> a -> a) -> a -> ParsecDSL s u m a Source #

chainr1 :: ParsecDSL s u m a -> ParsecDSL s u m (a -> a -> a) -> ParsecDSL s u m a Source #

choice :: [ParsecDSL s u m a] -> ParsecDSL s u m a Source #

count :: Int -> ParsecDSL s u m a -> ParsecDSL s u m [a] Source #

lookAhead :: ParsecDSL s u m a -> ParsecDSL s u m a Source #

many :: ParsecDSL s u m a -> ParsecDSL s u m [a] Source #

many1 :: ParsecDSL s u m a -> ParsecDSL s u m [a] Source #

manyAccum :: (a -> [a] -> [a]) -> ParsecDSL s u m a -> ParsecDSL s u m [a] Source #

notFollowedBy :: Show a => ParsecDSL s u m a -> ParsecDSL s u m () Source #

option :: a -> ParsecDSL s u m a -> ParsecDSL s u m a Source #

optionMaybe :: ParsecDSL s u m a -> ParsecDSL s u m (Maybe a) Source #

optional :: ParsecDSL s u m a -> ParsecDSL s u m () Source #

skipMany :: ParsecDSL s u m a -> ParsecDSL s u m () Source #

skipMany1 :: ParsecDSL s u m a -> ParsecDSL s u m () Source #

manyTill :: ParsecDSL s u m a -> ParsecDSL s u m end -> ParsecDSL s u m [a] Source #

between :: ParsecDSL s u m open -> ParsecDSL s u m close -> ParsecDSL s u m a -> ParsecDSL s u m a Source #

endBy :: ParsecDSL s u m a -> ParsecDSL s u m sep -> ParsecDSL s u m [a] Source #

endBy1 :: ParsecDSL s u m a -> ParsecDSL s u m sep -> ParsecDSL s u m [a] Source #

sepBy :: ParsecDSL s u m a -> ParsecDSL s u m sep -> ParsecDSL s u m [a] Source #

sepBy1 :: ParsecDSL s u m a -> ParsecDSL s u m sep -> ParsecDSL s u m [a] Source #

sepEndBy :: ParsecDSL s u m a -> ParsecDSL s u m sep -> ParsecDSL s u m [a] Source #

sepEndBy1 :: ParsecDSL s u m a -> ParsecDSL s u m sep -> ParsecDSL s u m [a] Source #