mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
mapContiguous takes a ComparabilityRelation.
This commit is contained in:
parent
9c37f641da
commit
76d3373d39
@ -233,9 +233,10 @@ insertion previous unmappedA unmappedB (UnmappedTerm j _ b) = do
|
|||||||
pure (That (j, b))
|
pure (That (j, b))
|
||||||
|
|
||||||
mapContiguous :: Functor syntax
|
mapContiguous :: Functor syntax
|
||||||
=> RWSEditScript syntax (Record (FeatureVector ': fields1)) (Record (FeatureVector ': fields2))
|
=> ComparabilityRelation syntax ann1 ann2
|
||||||
|
-> RWSEditScript syntax (Record (FeatureVector ': fields1)) (Record (FeatureVector ': fields2))
|
||||||
-> [MappedDiff syntax (Record (FeatureVector ': fields1)) (Record (FeatureVector ': fields2))]
|
-> [MappedDiff syntax (Record (FeatureVector ': fields1)) (Record (FeatureVector ': fields2))]
|
||||||
mapContiguous = go 0 0 []
|
mapContiguous canCompare = go 0 0 []
|
||||||
where go _ _ chunk [] = mapChunk chunk []
|
where go _ _ chunk [] = mapChunk chunk []
|
||||||
go i j chunk (first : rest) = case first of
|
go i j chunk (first : rest) = case first of
|
||||||
This a -> go (succ i) j (Left (i, a) : chunk) rest
|
This a -> go (succ i) j (Left (i, a) : chunk) rest
|
||||||
|
Loading…
Reference in New Issue
Block a user