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
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) |
Instances
Foldable DiffOp Source # | |
Defined in Unison.Merge.DiffOp Methods fold :: Monoid m => DiffOp m -> m # foldMap :: Monoid m => (a -> m) -> DiffOp a -> m # foldMap' :: Monoid m => (a -> m) -> DiffOp a -> m # foldr :: (a -> b -> b) -> b -> DiffOp a -> b # foldr' :: (a -> b -> b) -> b -> DiffOp a -> b # foldl :: (b -> a -> b) -> b -> DiffOp a -> b # foldl' :: (b -> a -> b) -> b -> DiffOp a -> b # foldr1 :: (a -> a -> a) -> DiffOp a -> a # foldl1 :: (a -> a -> a) -> DiffOp a -> a # elem :: Eq a => a -> DiffOp a -> Bool # maximum :: Ord a => DiffOp a -> a # minimum :: Ord a => DiffOp a -> a # | |
Traversable DiffOp Source # | |
Functor DiffOp Source # | |
Show a => Show (DiffOp a) Source # | |
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 |
Instances
Foldable DiffOp2 Source # | |
Defined in Unison.Merge.DiffOp Methods fold :: Monoid m => DiffOp2 m -> m # foldMap :: Monoid m => (a -> m) -> DiffOp2 a -> m # foldMap' :: Monoid m => (a -> m) -> DiffOp2 a -> m # foldr :: (a -> b -> b) -> b -> DiffOp2 a -> b # foldr' :: (a -> b -> b) -> b -> DiffOp2 a -> b # foldl :: (b -> a -> b) -> b -> DiffOp2 a -> b # foldl' :: (b -> a -> b) -> b -> DiffOp2 a -> b # foldr1 :: (a -> a -> a) -> DiffOp2 a -> a # foldl1 :: (a -> a -> a) -> DiffOp2 a -> a # elem :: Eq a => a -> DiffOp2 a -> Bool # maximum :: Ord a => DiffOp2 a -> a # minimum :: Ord a => DiffOp2 a -> a # | |
Traversable DiffOp2 Source # | |
Functor DiffOp2 Source # | |
Show a => Show (DiffOp2 a) Source # | |