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
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
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 #

map :: (a -> b) -> DiffOp a -> DiffOp b Source #

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