mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Specialize decompose to record annotations.
This commit is contained in:
parent
e7cc5a9c6e
commit
b48a15e277
@ -100,7 +100,7 @@ runAlgorithm recur = iterAp $ \ r cont -> case r of
|
||||
Replace a b -> cont (replacing a b)
|
||||
|
||||
-- | Decompose a step of an algorithm into the next steps to perform.
|
||||
decompose :: (GAlign f, Traversable f) => AlgorithmF (Term f ann) (Diff f ann) result -> Algorithm (Term f ann) (Diff f ann) result
|
||||
decompose :: (GAlign f, Traversable f) => AlgorithmF (Term f (Record fields)) (Diff f (Record fields)) result -> Algorithm (Term f (Record fields)) (Diff f (Record fields)) result
|
||||
decompose = \case
|
||||
Linear t1 t2 -> case galignWith recur (unwrap t1) (unwrap t2) of
|
||||
Just result -> annotate t1 t2 <$> sequenceA result
|
||||
|
Loading…
Reference in New Issue
Block a user