Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data DiffOpaques
- data DiffMode
- data DiffOptions = DiffOptions {}
- diffOptionsDefault :: DiffOptions
- type IsSharedMap = Trie MetavarAndArity
- data MetavarAndArity = MAA {
- getMetavar :: Int
- getArity :: Int
- type MinHeight = Int
Documentation
data DiffOpaques Source #
Controls the sharing of opaque values.
DO_Never | Never share opaque values |
DO_OnSpine | Only share opaque values that appear on the spine. |
DO_AsIs | Handle values of type |
Instances
Eq DiffOpaques Source # | |
Defined in Data.HDiff.Diff.Types (==) :: DiffOpaques -> DiffOpaques -> Bool # (/=) :: DiffOpaques -> DiffOpaques -> Bool # | |
Show DiffOpaques Source # | |
Defined in Data.HDiff.Diff.Types showsPrec :: Int -> DiffOpaques -> ShowS # show :: DiffOpaques -> String # showList :: [DiffOpaques] -> ShowS # |
Diffing Algorithm modes. This is better illustrated with an example. Supposte we have the following source and destination trees:
src = Bin (Bin t k) u dst = Bin (Bin t k) t
DM_ProperShare | The proper share algorithm will only share the trees that are supposed to be a proper share. With the src and dst above, it will produce: diff src dst = Bin (Bin 0 1) u |-> Bin (Bin 0 1) 0 A good intuition is that this approach will prefer maximum sharing as opposed to sharing bigger trees. |
DM_NoNested | The first algoritm we produced. Does not share nested trees. In fact, with this mode we will get the following result: diff src dst = Bin 0 u |-> Bin 0 t |
DM_Patience | Similar to |
Instances
Enum DiffMode Source # | |
Eq DiffMode Source # | |
Show DiffMode Source # | |
data DiffOptions Source #
Specifies the options for the diffing algorithm
DiffOptions | Minimum height of trees considered for sharing |
|
Instances
Eq DiffOptions Source # | |
Defined in Data.HDiff.Diff.Types (==) :: DiffOptions -> DiffOptions -> Bool # (/=) :: DiffOptions -> DiffOptions -> Bool # | |
Show DiffOptions Source # | |
Defined in Data.HDiff.Diff.Types showsPrec :: Int -> DiffOptions -> ShowS # show :: DiffOptions -> String # showList :: [DiffOptions] -> ShowS # |
type IsSharedMap = Trie MetavarAndArity Source #
The data structure that captures which subtrees are shared between source and destination. Besides providing an efficient answer to the query: "is this tree shared?", it also gives a unique identifier to that tree, allowing us to easily build our n-holed treefix.
data MetavarAndArity Source #
MAA | |
|
Instances
Eq MetavarAndArity Source # | |
Defined in Data.HDiff.Diff.Types (==) :: MetavarAndArity -> MetavarAndArity -> Bool # (/=) :: MetavarAndArity -> MetavarAndArity -> Bool # | |
Show MetavarAndArity Source # | |
Defined in Data.HDiff.Diff.Types showsPrec :: Int -> MetavarAndArity -> ShowS # show :: MetavarAndArity -> String # showList :: [MetavarAndArity] -> ShowS # |