Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class KnownSymbol v => HasRuleExprField rules v where Source #
type RuleExprReturnType rules v :: Type Source #
getExprField :: rules -> proxy v -> RuleExprType rules (RuleExprReturnType rules v) Source #
nonTerminalName :: rules -> proxy v -> String Source #
class MemberInitials rules initials where Source #
memberInitials :: T (DictF (HasRuleExprField rules)) initials Source #
class Rules rules where Source #
generateRules :: T (DictF (HasRuleExprField rules)) (RulesTag rules) Source #
class GrammarToken tokens elem where Source #
data DictF (a :: k -> Constraint) (b :: k) where #
DictF :: forall k (a :: k -> Constraint) (b :: k). a b => DictF a b |
newtype SemActM ctx us a Source #
SemActM | |
|
newtype ActionTask ctx a Source #
ActionTask | |
|
Instances
Monad (ActionTask ctx) Source # | |
Defined in Language.Parser.Ptera.Syntax (>>=) :: ActionTask ctx a -> (a -> ActionTask ctx b) -> ActionTask ctx b # (>>) :: ActionTask ctx a -> ActionTask ctx b -> ActionTask ctx b # return :: a -> ActionTask ctx a # | |
Functor (ActionTask ctx) Source # | |
Defined in Language.Parser.Ptera.Syntax fmap :: (a -> b) -> ActionTask ctx a -> ActionTask ctx b # (<$) :: a -> ActionTask ctx b -> ActionTask ctx a # | |
Applicative (ActionTask ctx) Source # | |
Defined in Language.Parser.Ptera.Syntax pure :: a -> ActionTask ctx a # (<*>) :: ActionTask ctx (a -> b) -> ActionTask ctx a -> ActionTask ctx b # liftA2 :: (a -> b -> c) -> ActionTask ctx a -> ActionTask ctx b -> ActionTask ctx c # (*>) :: ActionTask ctx a -> ActionTask ctx b -> ActionTask ctx b # (<*) :: ActionTask ctx a -> ActionTask ctx b -> ActionTask ctx a # |
data ActionTaskResult ctx a Source #
Instances
Functor (ActionTaskResult ctx) Source # | |
Defined in Language.Parser.Ptera.Syntax fmap :: (a -> b) -> ActionTaskResult ctx a -> ActionTaskResult ctx b # (<$) :: a -> ActionTaskResult ctx b -> ActionTaskResult ctx a # | |
(Eq a, Eq ctx) => Eq (ActionTaskResult ctx a) Source # | |
Defined in Language.Parser.Ptera.Syntax (==) :: ActionTaskResult ctx a -> ActionTaskResult ctx a -> Bool # (/=) :: ActionTaskResult ctx a -> ActionTaskResult ctx a -> Bool # | |
(Show a, Show ctx) => Show (ActionTaskResult ctx a) Source # | |
Defined in Language.Parser.Ptera.Syntax showsPrec :: Int -> ActionTaskResult ctx a -> ShowS # show :: ActionTaskResult ctx a -> String # showList :: [ActionTaskResult ctx a] -> ShowS # |
getAction :: ActionTask ctx ctx Source #
modifyAction :: (ctx -> ctx) -> ActionTask ctx () Source #
failAction :: ActionTask ctx a Source #
fixGrammar :: forall initials action rules tokens elem. MemberInitials rules initials => Rules rules => RuleExprType rules ~ RuleExpr action rules tokens elem => rules -> Grammar action rules tokens elem initials Source #
(<^>) :: Expr rules tokens elem us1 -> Expr rules tokens elem us2 -> Expr rules tokens elem (Concat us1 us2) infixr 5 Source #
(<:>) :: Expr rules tokens elem us -> (HList us -> a) -> AltM ctx rules tokens elem a infixl 4 Source #
(<::>) :: Expr rules tokens elem us -> (HList us -> ActionTask ctx a) -> AltM ctx rules tokens elem a infixl 4 Source #
var :: KnownSymbol v => proxy v -> Expr rules tokens elem '[RuleExprReturnType rules v] Source #
varA :: forall v rules tokens elem. KnownSymbol v => Expr rules tokens elem '[RuleExprReturnType rules v] Source #
class TokensMember tokens t where Source #
tokensMembership :: Proxy# '(tokens, t) -> Membership (TokensTag tokens) t Source #
tokA :: forall t rules tokens elem. TokensMember tokens t => Expr rules tokens elem '[elem] Source #