1
1
mirror of https://github.com/github/semantic.git synced 2025-01-09 00:56:32 +03:00

Move q application out

This commit is contained in:
joshvera 2017-04-11 18:23:32 -04:00
parent 1a78d5e1ea
commit 95beaf8446

View File

@ -93,16 +93,16 @@ run :: (Eq1 f, Functor f, HasField fields Category, HasField fields (Maybe Featu
-> t (Term f (Record fields)) -> t (Term f (Record fields))
-> Eff (RWS f fields ': e) (RWSEditScript f fields) -> Eff (RWS f fields ': e) (RWSEditScript f fields)
-> Eff e (RWSEditScript f fields) -> Eff e (RWSEditScript f fields)
run editDistance canCompare as bs = relay pure (\m q -> case m of run editDistance canCompare as bs = relay pure (\m q -> q $ case m of
SES -> q $ ses (gliftEq (==) `on` fmap category) as bs SES -> ses (gliftEq (==) `on` fmap category) as bs
(GenFeaturizedTermsAndDiffs sesDiffs) -> (GenFeaturizedTermsAndDiffs sesDiffs) ->
q $ genFeaturizedTermsAndDiffs sesDiffs genFeaturizedTermsAndDiffs sesDiffs
(FindNearestNeighoursToDiff allDiffs featureAs featureBs) -> (FindNearestNeighoursToDiff allDiffs featureAs featureBs) ->
q $ findNearestNeighboursToDiff editDistance canCompare allDiffs featureAs featureBs findNearestNeighboursToDiff editDistance canCompare allDiffs featureAs featureBs
(DeleteRemaining allDiffs remainingDiffs) -> (DeleteRemaining allDiffs remainingDiffs) ->
q $ deleteRemaining allDiffs remainingDiffs deleteRemaining allDiffs remainingDiffs
(InsertMapped allDiffs mappedDiffs) -> (InsertMapped allDiffs mappedDiffs) ->
q $ insertMapped allDiffs mappedDiffs) insertMapped allDiffs mappedDiffs)
type Diff f fields = These (Term f (Record fields)) (Term f (Record fields)) type Diff f fields = These (Term f (Record fields)) (Term f (Record fields))