transformations-0.1.1.0: Generic representation of tree transformations

Safe HaskellSafe-Inferred

Generics.MultiRec.Transformations.Explicit

Synopsis

Documentation

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

Constructors

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

data WithRef phi f a Source

Constructors

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

Methods

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

indexI :: phi ix -> IntSource

class HasRef phi whereSource

Associated Types

type RefRep phi ix Source

Methods

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

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

data NiceInsert phi whereSource

Constructors

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