From d9a1bd29f265ef04e5509835923d871181680600 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 4 Aug 2016 11:11:22 -0400 Subject: [PATCH] :fire: `run`. --- src/Interpreter.hs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Interpreter.hs b/src/Interpreter.hs index d356cdeee..af5179c0d 100644 --- a/src/Interpreter.hs +++ b/src/Interpreter.hs @@ -47,14 +47,6 @@ algorithmWithTerms construct t1 t2 = case (unwrap t1, unwrap t2) of _ -> recursively t1 t2 where annotate = pure . construct . (both (extract t1) (extract t2) :<) --- | Runs the diff algorithm -run :: (Eq leaf, Hashable leaf, Eq (Record fields), HasField fields Category) => DiffConstructor leaf (Record fields) -> Comparable leaf (Record fields) -> SES.Cost (Diff leaf (Record fields)) -> Algorithm (Term leaf (Record fields)) (Diff leaf (Record fields)) (Diff leaf (Record fields)) -> Maybe (Diff leaf (Record fields)) -run construct comparable cost = runAlgorithm construct recur cost getLabel . fmap Just - where recur a b = diffComparableTerms construct comparable cost a b - getLabel (h :< t) = (category h, case t of - Leaf s -> Just s - _ -> Nothing) - runAlgorithm :: (Functor f, GAlign f, Eq a, Eq annotation, Eq (f (Cofree f annotation)), Prologue.Foldable f, Traversable f, Hashable label) => (CofreeF f (Both annotation) (Free (CofreeF f (Both annotation)) (Patch (Cofree f annotation))) -> Free (CofreeF f (Both annotation)) (Patch (Cofree f annotation))) -> (Cofree f annotation -> Cofree f annotation -> Maybe (Free (CofreeF f (Both annotation)) (Patch (Cofree f annotation)))) ->