From 30fe4d520b8e04781f18d7a62c8ce6fab5bfc2bc Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sat, 9 Sep 2017 11:54:29 +0100 Subject: [PATCH] Define a copy helper. --- src/Diff.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Diff.hs b/src/Diff.hs index 8be3b1682..b672bb862 100644 --- a/src/Diff.hs +++ b/src/Diff.hs @@ -66,6 +66,8 @@ deleting :: Term syntax ann -> Diff syntax ann deleting = Diff . Patch . Delete +copy :: Both ann -> syntax (Diff syntax ann) -> Diff syntax ann +copy = (Diff .) . Copy instance Apply1 Pretty1 fs => Pretty1 (Diff (Union fs)) where