From 975c310e975e017a17f35e03d592e8c90a10a99e Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 23 Feb 2017 16:42:41 -0500 Subject: [PATCH] Inline the definition of annotate. --- src/Interpreter.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Interpreter.hs b/src/Interpreter.hs index 736c80dd1..05a23078c 100644 --- a/src/Interpreter.hs +++ b/src/Interpreter.hs @@ -114,13 +114,13 @@ decompose :: (Eq1 f, GAlign f, Traversable f, HasField fields Category, HasField -> 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 diffThese (unwrap t1) (unwrap t2) of - Just result -> annotate t1 t2 <$> sequenceA result + Just result -> wrap . (both (extract t1) (extract t2) :<) <$> sequenceA result _ -> byReplacing t1 t2 RWS as bs -> traverse diffThese (rws (editDistanceUpTo defaultM) comparable as bs) Delete a -> pure (deleting a) Insert b -> pure (inserting b) Replace a b -> pure (replacing a b) - where annotate t1 t2 = wrap . (both (extract t1) (extract t2) :<) + -- | How many nodes to consider for our constant-time approximation to tree edit distance. defaultM :: Integer