mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
📝 the Algorithm DSL.
This commit is contained in:
parent
b4683ffc4f
commit
e1bb2297af
@ -19,11 +19,14 @@ data AlgorithmF
|
||||
-- | A lazily-produced AST for diffing.
|
||||
type Algorithm term diff = F (AlgorithmF term diff)
|
||||
|
||||
-- | Constructs a 'Recursive' diff of two terms.
|
||||
recursively :: term -> term -> Algorithm term diff diff
|
||||
recursively a b = wrap (Recursive a b pure)
|
||||
|
||||
-- | Constructs a 'ByIndex' diff of two lists of terms.
|
||||
byIndex :: [term] -> [term] -> Algorithm term diff [diff]
|
||||
byIndex a b = wrap (ByIndex a b pure)
|
||||
|
||||
-- | Constructs a 'BySimilarity' diff of two lists of terms.
|
||||
bySimilarity :: [term] -> [term] -> Algorithm term diff [diff]
|
||||
bySimilarity a b = wrap (BySimilarity a b pure)
|
||||
|
Loading…
Reference in New Issue
Block a user