From 0d2e88140580041bbdbf9fedf5e09c2542ca0677 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 30 Nov 2015 16:21:41 -0500 Subject: [PATCH] Diffing an empty list against a non-empty list produces insertions. --- src/SES.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SES.hs b/src/SES.hs index b2770fe73..ef7a86a80 100644 --- a/src/SES.hs +++ b/src/SES.hs @@ -26,4 +26,5 @@ ses diffTerms cost (a : as) (b : bs) = case diffTerms a b of diffAt :: (Integer, Integer) -> [Term String Info] -> [Term String Info] -> State (Map.Map (Integer, Integer) [(Diff String Info, Integer)]) [Diff String Info] diffAt _ [] [] = return [] +diffAt (i, j) [] bs = return $ (Pure . Insert) <$> bs diffAt (i, j) as bs = _