packages feed

levenshtein 0.1.2.0 → 0.1.3.0

raw patch · 2 files changed

+3/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

levenshtein.cabal view
@@ -1,5 +1,5 @@ name:                levenshtein-version:             0.1.2.0+version:             0.1.3.0 synopsis:            Calculate the edit distance between two foldables. description:   A package to determine the edit distance between two 'Foldable's.
test/Data/Foldable/LevenshteinSpec.hs view
@@ -10,7 +10,7 @@ import Test.QuickCheck(maxSuccess, property, quickCheckWith, stdArgs)  ntimes :: Int-ntimes = 100000+ntimes = 1000  spec :: Spec spec = do@@ -67,7 +67,7 @@ ifZeroThenSame xs ys = (levenshteinDistance xs ys == (0 :: Int)) == (xs == ys)  testApplyingEdits :: forall a . Eq a => [a] -> [a] -> Bool-testApplyingEdits xs ys = applyEdits (snd (levenshtein xs ys)) xs == Just ys+testApplyingEdits xs ys = applyEdits (snd ((levenshtein @[] @[] @a @Int) xs ys)) xs == Just ys  hammingDistanceBound :: forall a . Eq a => [a] -> [a] -> Bool hammingDistanceBound xs ys = length xs /= length ys || levenshteinDistance xs ys <= hammingDistance xs ys