mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Alias the comparison function’s type.
This commit is contained in:
parent
e7e2f280e1
commit
ad0c9ca4b2
@ -1,11 +1,13 @@
|
||||
module SES (ses) where
|
||||
module SES (ses, Compare) where
|
||||
|
||||
import Patch
|
||||
import Diff
|
||||
import Control.Monad.Free
|
||||
import Control.Comonad.Cofree
|
||||
|
||||
ses :: (Term a Info -> Term a Info -> Maybe (Diff a)) -> [Term a Info] -> [Term a Info] -> [Diff a]
|
||||
type Compare a = Term a Info -> Term a Info -> Maybe (Diff a)
|
||||
|
||||
ses :: Compare a -> [Term a Info] -> [Term a Info] -> [Diff a]
|
||||
ses _ [] b = (Pure . Insert) <$> b
|
||||
ses _ a [] = (Pure . Delete) <$> a
|
||||
ses recur (a : as) (b : bs) = case recur a b of
|
||||
|
Loading…
Reference in New Issue
Block a user