Safe Haskell | None |
---|

- diff :: forall a. Transform a => a -> a -> Transformation a
- apply :: Transform a => Transformation a -> a -> Maybe a
- type Transformation a = [(Path, Fix (WithRef a))]
- data WithRef a b
- type Path = [Int]
- class (Regular a, Children (PF a), CountI (PF a), Functor (PF a), SEq (PF a), ExtractN (PF a), MapN (PF a), GMap (PF a), GOrd (PF a), Eq (PF a)) => Transform a
- class HasRef a where
- type NiceTransformation a = [(Path, RefRep a)]
- toNiceTransformation :: (Functor (PF a), HasRef a) => Transformation a -> NiceTransformation a
- fromNiceTransformation :: (Functor (PF a), HasRef a) => NiceTransformation a -> Transformation a

# Documentation

diff :: forall a. Transform a => a -> a -> Transformation aSource

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

apply :: Transform a => Transformation a -> a -> Maybe aSource

Apply the edits to the given tree

type Transformation a = [(Path, Fix (WithRef a))]Source

class (Regular a, Children (PF a), CountI (PF a), Functor (PF a), SEq (PF a), ExtractN (PF a), MapN (PF a), GMap (PF a), GOrd (PF a), Eq (PF a)) => Transform a Source

type NiceTransformation a = [(Path, RefRep a)]Source

toNiceTransformation :: (Functor (PF a), HasRef a) => Transformation a -> NiceTransformation aSource

fromNiceTransformation :: (Functor (PF a), HasRef a) => NiceTransformation a -> Transformation aSource