diff options
author | Bas van Dijk <v.dijk.bas@gmail.com> | 2011-10-29 03:38:07 +0200 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-01-14 00:53:27 +0000 |
commit | 804108f0c0fbc2c5f926e4cb4d30b3891443a079 (patch) | |
tree | cd67ac2b585af9b1bab31305f3fab43989c536c7 /compiler/utils/Util.lhs | |
parent | 6b58460309598b399fba1bdd223da7bc96d07431 (diff) | |
download | haskell-804108f0c0fbc2c5f926e4cb4d30b3891443a079.tar.gz |
Add extra Num constraints since the Num superclass of Bits is removed
Diffstat (limited to 'compiler/utils/Util.lhs')
-rw-r--r-- | compiler/utils/Util.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 93800b0399..bbf56bc2fe 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -753,7 +753,7 @@ restrictedDamerauLevenshteinDistanceWithLengths m n str1 str2 else restrictedDamerauLevenshteinDistance' (undefined :: Integer) n m str2 str1 restrictedDamerauLevenshteinDistance' - :: (Bits bv) => bv -> Int -> Int -> String -> String -> Int + :: (Bits bv, Num bv) => bv -> Int -> Int -> String -> String -> Int restrictedDamerauLevenshteinDistance' _bv_dummy m n str1 str2 | [] <- str1 = n | otherwise = extractAnswer $ @@ -766,7 +766,7 @@ restrictedDamerauLevenshteinDistance' _bv_dummy m n str1 str2 extractAnswer (_, _, _, _, distance) = distance restrictedDamerauLevenshteinDistanceWorker - :: (Bits bv) => IM.IntMap bv -> bv -> bv + :: (Bits bv, Num bv) => IM.IntMap bv -> bv -> bv -> (bv, bv, bv, bv, Int) -> Char -> (bv, bv, bv, bv, Int) restrictedDamerauLevenshteinDistanceWorker str1_mvs top_bit_mask vector_mask (pm, d0, vp, vn, distance) char2 @@ -795,7 +795,7 @@ restrictedDamerauLevenshteinDistanceWorker str1_mvs top_bit_mask vector_mask sizedComplement :: Bits bv => bv -> bv -> bv sizedComplement vector_mask vect = vector_mask `xor` vect -matchVectors :: Bits bv => String -> IM.IntMap bv +matchVectors :: (Bits bv, Num bv) => String -> IM.IntMap bv matchVectors = snd . foldl' go (0 :: Int, IM.empty) where go (ix, im) char = let ix' = ix + 1 |