transformations-0.1.1.0: Generic representation of tree transformations

Generics.MultiRec.Rewriting.Machinery

class (Fam phi, EqS phi, HZip phi (PF phi), HFunctor phi (PF phi)) => Rewrite phi Source

Instances

rewriteM :: Rewrite phi => Rule phi a -> a -> Maybe aSource

match :: (Monad m, Rewrite phi) => phi ix -> Scheme phi ix -> ix -> m (Subst phi)Source

matchM :: (Monad m, Rewrite phi) => phi ix -> Scheme phi ix -> I0 ix -> StateT (Subst phi) m ()Source

checkEqual :: (Monad m, Rewrite phi) => phi ix -> ix -> Any phi -> m ()Source

inst :: Rewrite phi => Subst phi -> phi ix -> Scheme phi ix -> ixSource

type Subst phi = Map Metavar (Any phi)Source