parsley-core-1.4.0.0: A fast parser combinator library backed by Typed Template Haskell
Safe HaskellNone
LanguageHaskell2010

Parsley.Internal.Core.CombinatorAST

Synopsis

Documentation

newtype Reg (r :: Type) a Source #

This is an opaque representation of a parsing register. It cannot be manipulated as a user, and the type parameter r is used to ensure that it cannot leak out of the scope it has been created in. It is the abstracted representation of a runtime storage location.

Since: 0.1.0.0

Constructors

Reg (ΣVar a) 

data ScopeRegister (k :: Type -> Type) (a :: Type) where Source #

Constructors

ScopeRegister :: k a -> (forall r. Reg r a -> k b) -> ScopeRegister k b 

Instances

Instances details
IFunctor ScopeRegister Source # 
Instance details

Defined in Parsley.Internal.Core.CombinatorAST

Methods

imap :: (forall j. a j -> b j) -> ScopeRegister a i -> ScopeRegister b i Source #

data Combinator (k :: Type -> Type) (a :: Type) where Source #

Constructors

Pure :: Defunc a -> Combinator k a 
Satisfy :: Defunc (Char -> Bool) -> Combinator k Char 
(:<*>:) :: k (a -> b) -> k a -> Combinator k b 
(:*>:) :: k a -> k b -> Combinator k b 
(:<*:) :: k a -> k b -> Combinator k a 
(:<|>:) :: k a -> k a -> Combinator k a 
Empty :: Combinator k a 
Try :: k a -> Combinator k a 
LookAhead :: k a -> Combinator k a 
Let :: Bool -> MVar a -> k a -> Combinator k a 
NotFollowedBy :: k a -> Combinator k () 
Branch :: k (Either a b) -> k (a -> c) -> k (b -> c) -> Combinator k c 
Match :: k a -> [Defunc (a -> Bool)] -> [k b] -> k b -> Combinator k b 
ChainPre :: k (a -> a) -> k a -> Combinator k a 
ChainPost :: k a -> k (a -> a) -> Combinator k a 
MakeRegister :: ΣVar a -> k a -> k b -> Combinator k b 
GetRegister :: ΣVar a -> Combinator k a 
PutRegister :: ΣVar a -> k a -> Combinator k () 
Debug :: String -> k a -> Combinator k a 
MetaCombinator :: MetaCombinator -> k a -> Combinator k a 

Instances

Instances details
IFunctor Combinator Source # 
Instance details

Defined in Parsley.Internal.Core.CombinatorAST

Methods

imap :: (forall j. a j -> b j) -> Combinator a i -> Combinator b i Source #

Show (Fix Combinator a) Source # 
Instance details

Defined in Parsley.Internal.Core.CombinatorAST

newtype Parser a Source #

The opaque datatype that represents parsers.

Since: 0.1.0.0

Constructors

Parser 

traverseCombinator :: Applicative m => (forall a. f a -> m (k a)) -> Combinator f a -> m (Combinator k a) Source #