ajhc-0.8.0.5: Haskell compiler that produce binary through C language

Safe HaskellNone

E.Rules

Documentation

data ARules Source

Instances

Show ARules

ARules contains a set of rules for a single id, optimized for fast application

invarients for ARules sorted by number of arguments rule takes all hidden rule fields filled in free variables are up to date

Monoid ARules 
Binary ARules 

data Rule Source

Constructors

Rule TVr [TVr] [E] !Int E RuleType (Module, Int) Atom 

Instances

newtype Rules Source

Constructors

Rules (IdMap [Rule]) 

applyRules :: MonadStats m => (Id -> Maybe E) -> ARules -> [E] -> m (Maybe (E, [E]))Source

builtinRule :: MonadStats m => TVr' t -> [E] -> m (Maybe (E, [E]))Source

dropArguments :: [(Int, E)] -> [Rule] -> [Rule]Source

mapRBodyArgs :: Monad m => (E -> m E) -> Rule -> m RuleSource

makeRuleSource

Arguments

:: String

the rule name

-> (Module, Int)

a unique name for this rule

-> RuleType

type of rule

-> [TVr]

the free variables

-> TVr

the head

-> [E]

the args

-> E

the body

-> Rule 

mapBodies :: Monad m => (E -> m E) -> Rules -> m RulesSource