unison-merge-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Merge.Diff

Synopsis

Documentation

nameBasedNamespaceDiff :: HasCallStack => TwoWay DeclNameLookup -> PartialDeclNameLookup -> ThreeWay (Defns (BiMultimap Referent Name) (BiMultimap TypeReference Name)) -> Defns (Map TermReferenceId (Term Symbol Ann)) (Map TypeReferenceId (Decl Symbol Ann)) -> TwoWay (DefnsF3 (Map Name) DiffOp Synhashed Referent TypeReference) Source #

nameBasedNamespaceDiff db declNameLookups defns returns Alice's and Bob's name-based namespace diffs, each in the form:

terms :: Map Name (DiffOp (Synhashed Referent))
types :: Map Name (DiffOp (Synhashed TypeReference))

where each name is paired with its diff-op (added, deleted, or updated), relative to the LCA between Alice and Bob's branches. If the hash of a name did not change, it will not appear in the map.