1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Specialize RWS to list inputs.

This commit is contained in:
Rob Rix 2017-06-13 15:11:52 -04:00
parent 22a69851f0
commit 134a60222d

View File

@ -51,11 +51,11 @@ data UnmappedTerm f fields = UnmappedTerm {
-- | Either a `term`, an index of a matched term, or nil. -- | Either a `term`, an index of a matched term, or nil.
data TermOrIndexOrNone term = Term term | Index Int | None data TermOrIndexOrNone term = Term term | Index Int | None
rws :: (HasField fields (Maybe FeatureVector), Foldable t, Functor f, Eq1 f) rws :: (HasField fields (Maybe FeatureVector), Functor f, Eq1 f)
=> (Diff f fields -> Int) => (Diff f fields -> Int)
-> ComparabilityRelation f fields -> ComparabilityRelation f fields
-> t (Term f (Record fields)) -> [Term f (Record fields)]
-> t (Term f (Record fields)) -> [Term f (Record fields)]
-> RWSEditScript f fields -> RWSEditScript f fields
rws editDistance canCompare as bs = Eff.run . RWS.run editDistance canCompare as bs $ do rws editDistance canCompare as bs = Eff.run . RWS.run editDistance canCompare as bs $ do
sesDiffs <- ses' sesDiffs <- ses'