transformations- Generic representation of tree transformations

Safe HaskellSafe-Inferred




diff :: forall phi ix. Transform phi => phi ix -> ix -> ix -> Transformation phiSource

Find a set of insertions to transform the first into the second tree

apply :: forall phi ix. Transform phi => phi ix -> ix -> Transformation phi -> Maybe ixSource

Apply the transformation to the given tree

data AnyInsert phi whereSource


AnyInsert :: phi ix -> Path -> HFix (WithRef phi) ix -> AnyInsert phi 

data WithRef phi f a Source


InR (PF phi f a) 
Ref Path 

type Path = [Int]Source

class (Fam phi, Children phi (PF phi), CountI phi (PF phi), HFunctor phi (PF phi), SEq phi (PF phi), ExtractN phi (PF phi), MapN phi (PF phi), EqS phi, HEq phi (PF phi), HOrd phi (PF phi), OrdI phi) => Transform phi Source

class OrdI phi whereSource

Comparing index of different types


compareI :: phi ix -> phi ix' -> OrderingSource

indexI :: phi ix -> IntSource

class HasRef phi whereSource

Associated Types

type RefRep phi ix Source


toRef :: phi ix -> HFix (WithRef phi) ix -> RefRep phi ixSource

fromRef :: phi ix -> RefRep phi ix -> HFix (WithRef phi) ixSource

data NiceInsert phi whereSource


NiceInsert :: phi ix -> Path -> RefRep phi ix -> NiceInsert phi