1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Add a smart constructor for Recursive operations.

This commit is contained in:
Rob Rix 2016-08-03 18:15:18 -04:00
parent 9a14248c08
commit f6c8cd81da

View File

@ -19,3 +19,6 @@ data AlgorithmF
-- | A lazily-produced AST for diffing. -- | A lazily-produced AST for diffing.
type Algorithm a annotation = Free (AlgorithmF a annotation) type Algorithm a annotation = Free (AlgorithmF a annotation)
recursively :: Term leaf annotation -> Term leaf annotation -> Algorithm leaf annotation (Diff leaf annotation)
recursively a b = wrap (Recursive a b pure)