unison-merge-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Merge.DiffOp

Synopsis

Documentation

data DiffOp a Source #

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

Instances details
Foldable DiffOp Source # 
Instance details

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 #

toList :: DiffOp a -> [a] #

null :: DiffOp a -> Bool #

length :: DiffOp a -> Int #

elem :: Eq a => a -> DiffOp a -> Bool #

maximum :: Ord a => DiffOp a -> a #

minimum :: Ord a => DiffOp a -> a #

sum :: Num a => DiffOp a -> a #

product :: Num a => DiffOp a -> a #

Traversable DiffOp Source # 
Instance details

Defined in Unison.Merge.DiffOp

Methods

traverse :: Applicative f => (a -> f b) -> DiffOp a -> f (DiffOp b) #

sequenceA :: Applicative f => DiffOp (f a) -> f (DiffOp a) #

mapM :: Monad m => (a -> m b) -> DiffOp a -> m (DiffOp b) #

sequence :: Monad m => DiffOp (m a) -> m (DiffOp a) #

Functor DiffOp Source # 
Instance details

Defined in Unison.Merge.DiffOp

Methods

fmap :: (a -> b) -> DiffOp a -> DiffOp b #

(<$) :: a -> DiffOp b -> DiffOp a #

Show a => Show (DiffOp a) Source # 
Instance details

Defined in Unison.Merge.DiffOp

Methods

showsPrec :: Int -> DiffOp a -> ShowS #

show :: DiffOp a -> String #

showList :: [DiffOp a] -> ShowS #

data DiffOp2 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.

Instances

Instances details
Foldable DiffOp2 Source # 
Instance details

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 #

toList :: DiffOp2 a -> [a] #

null :: DiffOp2 a -> Bool #

length :: DiffOp2 a -> Int #

elem :: Eq a => a -> DiffOp2 a -> Bool #

maximum :: Ord a => DiffOp2 a -> a #

minimum :: Ord a => DiffOp2 a -> a #

sum :: Num a => DiffOp2 a -> a #

product :: Num a => DiffOp2 a -> a #

Traversable DiffOp2 Source # 
Instance details

Defined in Unison.Merge.DiffOp

Methods

traverse :: Applicative f => (a -> f b) -> DiffOp2 a -> f (DiffOp2 b) #

sequenceA :: Applicative f => DiffOp2 (f a) -> f (DiffOp2 a) #

mapM :: Monad m => (a -> m b) -> DiffOp2 a -> m (DiffOp2 b) #

sequence :: Monad m => DiffOp2 (m a) -> m (DiffOp2 a) #

Functor DiffOp2 Source # 
Instance details

Defined in Unison.Merge.DiffOp

Methods

fmap :: (a -> b) -> DiffOp2 a -> DiffOp2 b #

(<$) :: a -> DiffOp2 b -> DiffOp2 a #

Show a => Show (DiffOp2 a) Source # 
Instance details

Defined in Unison.Merge.DiffOp

Methods

showsPrec :: Int -> DiffOp2 a -> ShowS #

show :: DiffOp2 a -> String #

showList :: [DiffOp2 a] -> ShowS #