diff --git a/src/Interpreter.hs b/src/Interpreter.hs index fce99fc01..38faa5773 100644 --- a/src/Interpreter.hs +++ b/src/Interpreter.hs @@ -108,14 +108,11 @@ 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 - Linear t1 t2 -> case galignWith recur (unwrap t1) (unwrap t2) of + Linear t1 t2 -> case galignWith diffThese (unwrap t1) (unwrap t2) of Just result -> annotate t1 t2 <$> sequenceA result _ -> byReplacing t1 t2 - RWS as bs -> pure (rws recur' as bs) + RWS as bs -> pure (rws undefined comparable as bs) Delete a -> pure (deleting a) Insert b -> pure (inserting b) Replace a b -> pure (replacing a b) - where recur = these byDeleting byInserting linearly - annotate t1 t2 = wrap . (both (extract t1) (extract t2) :<) - recur' :: Term f (Record fields) -> Term f (Record fields) -> Maybe (Diff f (Record fields)) - recur' = undefined + where annotate t1 t2 = wrap . (both (extract t1) (extract t2) :<)