diff options
Diffstat (limited to 'Git/AutoCorrect.hs')
-rw-r--r-- | Git/AutoCorrect.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/AutoCorrect.hs b/Git/AutoCorrect.hs index a18bf5619..a1ef14779 100644 --- a/Git/AutoCorrect.hs +++ b/Git/AutoCorrect.hs @@ -34,7 +34,7 @@ fuzzymatches :: String -> (c -> String) -> [c] -> [c] fuzzymatches input showchoice choices = fst $ unzip $ sortBy comparecost $ filter similarEnough $ zip choices costs where - distance v = restrictedDamerauLevenshteinDistance gitEditCosts v input + distance = restrictedDamerauLevenshteinDistance gitEditCosts input costs = map (distance . showchoice) choices comparecost a b = compare (snd a) (snd b) similarEnough (_, cst) = cst < similarityFloor |