Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- diff :: forall t a b. (Recursively ZipMatch t, RTraversable t) => (Ann a # t) -> (Ann b # t) -> Diff a b # t
- data Diff a b e
- = CommonSubTree (Ann (a :*: b) e)
- | CommonBody (CommonBody a b e)
- | Different ((Ann a :*: Ann b) e)
- _CommonBody :: forall a b e. Prism' (Diff a b e) (CommonBody a b e)
- _CommonSubTree :: forall a b e. Prism' (Diff a b e) (Ann ((:*:) a b) e)
- _Different :: forall a b e. Prism' (Diff a b e) ((:*:) (Ann a) (Ann b) e)
- data CommonBody a b e = MkCommonBody {}
- anns :: forall a b e. Lens' (CommonBody a b e) ((:*:) a b e)
- val :: forall a b e. Lens' (CommonBody a b e) ((:#) e (Diff a b))
- foldDiffs :: forall r h a b. (Monoid r, Recursively HFoldable h) => (forall n. HRecWitness h n -> (Ann a # n) -> (Ann b # n) -> r) -> (Diff a b # h) -> r
- diffP :: forall h. (Recursively ZipMatch h, Recursively HasHPlain h, RTraversable h) => HPlain h -> HPlain h -> DiffP # h
- data DiffP h
- = CommonSubTreeP (HPlain (GetHyperType h))
- | CommonBodyP (h :# DiffP)
- | DifferentP (HPlain (GetHyperType h)) (HPlain (GetHyperType h))
- _CommonBodyP :: forall h. Prism' (DiffP h) ((:#) h DiffP)
- _CommonSubTreeP :: forall h. Prism' (DiffP h) (HPlain (GetHyperType h))
- _DifferentP :: forall h. Prism' (DiffP h) (HPlain (GetHyperType h), HPlain (GetHyperType h))
- foldDiffsP :: forall r h. (Monoid r, Recursively HFoldable h, Recursively HasHPlain h) => (forall n. HasHPlain n => HRecWitness h n -> HPlain n -> HPlain n -> r) -> (DiffP # h) -> r
Documentation
diff :: forall t a b. (Recursively ZipMatch t, RTraversable t) => (Ann a # t) -> (Ann b # t) -> Diff a b # t Source #
Compute the difference of two annotated trees.
A HyperType
which represents the difference between two annotated trees.
The annotation types also function as tokens
to describe which of the two trees a term comes from.
CommonSubTree (Ann (a :*: b) e) | |
CommonBody (CommonBody a b e) | |
Different ((Ann a :*: Ann b) e) |
Instances
_CommonBody :: forall a b e. Prism' (Diff a b e) (CommonBody a b e) Source #
data CommonBody a b e Source #
A HyperType
which represents two trees which have the same top-level node,
but their children may differ.
Instances
foldDiffs :: forall r h a b. (Monoid r, Recursively HFoldable h) => (forall n. HRecWitness h n -> (Ann a # n) -> (Ann b # n) -> r) -> (Diff a b # h) -> r Source #
diffP :: forall h. (Recursively ZipMatch h, Recursively HasHPlain h, RTraversable h) => HPlain h -> HPlain h -> DiffP # h Source #
CommonSubTreeP (HPlain (GetHyperType h)) | |
CommonBodyP (h :# DiffP) | |
DifferentP (HPlain (GetHyperType h)) (HPlain (GetHyperType h)) |
Instances
_CommonSubTreeP :: forall h. Prism' (DiffP h) (HPlain (GetHyperType h)) Source #
_DifferentP :: forall h. Prism' (DiffP h) (HPlain (GetHyperType h), HPlain (GetHyperType h)) Source #
foldDiffsP :: forall r h. (Monoid r, Recursively HFoldable h, Recursively HasHPlain h) => (forall n. HasHPlain n => HRecWitness h n -> HPlain n -> HPlain n -> r) -> (DiffP # h) -> r Source #