Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unison.Merge.DiffOp
Synopsis
- data DiffOp a
- = DiffOp'Add !a
- | DiffOp'Delete !a
- | DiffOp'Update !(Updated a)
- data DiffOp2 a
- = DiffOp2'Add !a
- | DiffOp2'Delete !a
- | DiffOp2'Update !(Updated a) !Bool
- map :: (a -> b) -> DiffOp a -> DiffOp b
- traverse :: Applicative f => (a -> f b) -> DiffOp a -> f (DiffOp b)
Documentation
A diff operation is one of:
- An add (where nothing was)
- A delete (of the thing that was)
- An update (from old to new)
Constructors
DiffOp'Add !a | |
DiffOp'Delete !a | |
DiffOp'Update !(Updated a) |
Like DiffOp
, but updates are tagged as propagated (True) or not (False).
This could be cleaned up a bit, but eh, it works for now. Historical context: the concept of a propagated upddate was not in the initial version of merge (which was only concerned with the merge algorithm and producing the correct output). However, it is now being incorporated, because when e.g. viewing a diff, we do want to see propagated, not drop them.
Constructors
DiffOp2'Add !a | |
DiffOp2'Delete !a | |
DiffOp2'Update !(Updated a) !Bool |