mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Define top-level RWS in terms of mapContiguous.
This commit is contained in:
parent
72f6981f15
commit
40631d8d00
@ -66,6 +66,10 @@ rws :: (Foldable syntax, Functor syntax, GAlign syntax)
|
||||
rws _ _ as [] = This <$> as
|
||||
rws _ _ [] bs = That <$> bs
|
||||
rws canCompare _ [a] [b] = if canCompareTerms canCompare a b then [These a b] else [That b, This a]
|
||||
rws canCompare equivalent as bs
|
||||
= ses equivalent as bs
|
||||
& mapContiguous canCompare
|
||||
& fmap (bimap snd snd)
|
||||
rws canCompare equivalent as bs
|
||||
= ses equivalent as bs
|
||||
& genFeaturizedTermsAndDiffs
|
||||
|
Loading…
Reference in New Issue
Block a user