From fe6d54ae04e7e2a15d91c8d98fce4694507c3c70 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 23 Feb 2017 16:48:38 -0500 Subject: [PATCH] Stub in handling of the Diff case. --- src/Interpreter.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Interpreter.hs b/src/Interpreter.hs index 05a23078c..e8868aef4 100644 --- a/src/Interpreter.hs +++ b/src/Interpreter.hs @@ -113,6 +113,8 @@ decompose :: (Eq1 f, GAlign f, Traversable f, HasField fields Category, HasField => AlgorithmF (Term f (Record fields)) (Diff f (Record fields)) result -- ^ The step in an algorithm to decompose into its next steps. -> Algorithm (Term f (Record fields)) (Diff f (Record fields)) result -- ^ The sequence of next steps to undertake to continue the algorithm. decompose = \case + Diff t1 t2 -> case (unwrap t1, unwrap t2) of + _ -> byReplacing t1 t2 Linear t1 t2 -> case galignWith diffThese (unwrap t1) (unwrap t2) of Just result -> wrap . (both (extract t1) (extract t2) :<) <$> sequenceA result _ -> byReplacing t1 t2