1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Diffing an empty list against a non-empty list produces insertions.

This commit is contained in:
Rob Rix 2015-11-30 16:21:41 -05:00
parent df23b3af23
commit 0d2e881405

View File

@ -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 = _