syntactic-1.12.1: Generic abstract syntax, and utilities for embedded languages

Safe HaskellNone






:: forall dom a . (ConstrainedBy dom Typeable, AlphaEq dom dom (NodeDomain dom) [(VarId, VarId)], Equality dom) 
=> (forall c. ASTF dom c -> Bool)

Control wether a sub-expression can be hoisted over the given expression

-> PrjDict dom 
-> MkInjDict dom 
-> ASTF dom a 
-> State VarId (ASTF dom a) 

reifySmart2 :: forall dom p pVar a. (AlphaEq dom dom (NodeDomain (FODomain dom p pVar)) [(VarId, VarId)], Equality dom, Syntactic a, Domain a ~ HODomain dom p pVar, p :< Typeable) => (forall c. ASTF (FODomain dom p pVar) c -> Bool) -> MkInjDict (FODomain dom p pVar) -> a -> ASTF (FODomain dom p pVar) (Internal a)Source

Like reify but with common sub-expression elimination and variable hoisting