mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Add a convenience to construct branch diffs.
This commit is contained in:
parent
361bfc0e81
commit
62ac37c981
@ -66,6 +66,9 @@ spec = parallel $ do
|
||||
patchWithBoth (Delete ()) = Delete . fst
|
||||
patchWithBoth (Replace () ()) = runBothWith Replace
|
||||
|
||||
branch :: annotation -> [Free (Annotated String annotation) patch] -> Free (Annotated String annotation) patch
|
||||
branch annotation = Free . Annotated annotation . Indexed
|
||||
|
||||
leaf :: annotation -> String -> Free (Annotated String annotation) patch
|
||||
leaf info = Free . Annotated info . Leaf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user