Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- diff :: forall t a b. (Recursively ZipMatch t, RTraversable t) => Tree (Ann a) t -> Tree (Ann b) t -> Tree (Diff a b) t
- data Diff a b e
- = CommonSubTree (Ann (a, b) e)
- | CommonBody (CommonBody a b e)
- | Different (Product (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) (Product (Ann a) (Ann b) e)
- data CommonBody a b e = MkCommonBody {}
- anns :: forall a b e. Lens' (CommonBody a b e) (a, b)
- val :: forall a b e e. Lens (CommonBody a b e) (CommonBody a b e) ((#) e (Diff a b)) ((#) e (Diff a b))
- foldDiffs :: forall r k a b. (Monoid r, Recursively KFoldable k) => (forall n. KRecWitness k n -> Tree (Ann a) n -> Tree (Ann b) n -> r) -> Tree (Diff a b) k -> r
- diffP :: forall k. (Recursively ZipMatch k, Recursively KHasPlain k, RTraversable k) => KPlain k -> KPlain k -> Tree DiffP k
- data DiffP k
- = CommonSubTreeP (KPlain (GetKnot k))
- | CommonBodyP (k # DiffP)
- | DifferentP (KPlain (GetKnot k)) (KPlain (GetKnot k))
- _CommonBodyP :: forall k. Prism' (DiffP k) ((#) k DiffP)
- _CommonSubTreeP :: forall k. Prism' (DiffP k) (KPlain (GetKnot k))
- _DifferentP :: forall k. Prism' (DiffP k) (KPlain (GetKnot k), KPlain (GetKnot k))
- foldDiffsP :: forall r k. (Monoid r, Recursively KFoldable k, Recursively KHasPlain k) => (forall n. KHasPlain n => KRecWitness k n -> KPlain n -> KPlain n -> r) -> Tree DiffP k -> r
Documentation
diff :: forall t a b. (Recursively ZipMatch t, RTraversable t) => Tree (Ann a) t -> Tree (Ann b) t -> Tree (Diff a b) t Source #
Compute the difference of two annotated trees.
A Knot
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 (Product (Ann a) (Ann b) e) |
Instances
Constraints (Diff a b e) Eq => Eq (Diff a b e) Source # | |
Constraints (Diff a b e) Ord => Ord (Diff a b e) Source # | |
Constraints (Diff a b e) Show => Show (Diff a b e) Source # | |
Generic (Diff a b e) Source # | |
Constraints (Diff a b e) Binary => Binary (Diff a b e) Source # | |
Constraints (Diff a b e) NFData => NFData (Diff a b e) Source # | |
type Rep (Diff a b e) Source # | |
Defined in AST.Diff type Rep (Diff a b e) = D1 (MetaData "Diff" "AST.Diff" "syntax-tree-0.1.0.0-8tfou50n4eQ4Iq1dis9DWN" False) (C1 (MetaCons "CommonSubTree" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann (a, b) e))) :+: (C1 (MetaCons "CommonBody" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (CommonBody a b e))) :+: C1 (MetaCons "Different" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Product (Ann a) (Ann b) e))))) |
_CommonBody :: forall a b e. Prism' (Diff a b e) (CommonBody a b e) Source #
data CommonBody a b e Source #
A Knot
which represents two trees which have the same top-level node,
but their children may differ.
Instances
anns :: forall a b e. Lens' (CommonBody a b e) (a, b) Source #
val :: forall a b e e. Lens (CommonBody a b e) (CommonBody a b e) ((#) e (Diff a b)) ((#) e (Diff a b)) Source #
foldDiffs :: forall r k a b. (Monoid r, Recursively KFoldable k) => (forall n. KRecWitness k n -> Tree (Ann a) n -> Tree (Ann b) n -> r) -> Tree (Diff a b) k -> r Source #
diffP :: forall k. (Recursively ZipMatch k, Recursively KHasPlain k, RTraversable k) => KPlain k -> KPlain k -> Tree DiffP k Source #
CommonSubTreeP (KPlain (GetKnot k)) | |
CommonBodyP (k # DiffP) | |
DifferentP (KPlain (GetKnot k)) (KPlain (GetKnot k)) |
Instances
foldDiffsP :: forall r k. (Monoid r, Recursively KFoldable k, Recursively KHasPlain k) => (forall n. KHasPlain n => KRecWitness k n -> KPlain n -> KPlain n -> r) -> Tree DiffP k -> r Source #