From b48a15e277c5c9ab8da9e4b05c7e9c39948742b1 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 21 Feb 2017 15:41:07 -0500 Subject: [PATCH] Specialize decompose to record annotations. --- src/Interpreter.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpreter.hs b/src/Interpreter.hs index 3aa1a22ad..88d40711c 100644 --- a/src/Interpreter.hs +++ b/src/Interpreter.hs @@ -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