1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Define a smart constructor for metavariable diffs.

This commit is contained in:
Rob Rix 2017-09-10 20:03:32 +01:00
parent 289cb11912
commit 5ac5d80875

View File

@ -149,6 +149,9 @@ deleting = cata (Diff . Patch . Delete)
copy :: Both ann -> syntax (Diff syntax ann) -> Diff syntax ann
copy = (Diff .) . (Copy [] .) . (:<)
var :: Metavar -> Diff syntax ann
var = Diff . Var
instance Pretty Metavar where
pretty (Metavar v) = pretty v