From 6402729f7a097fd970352bb1eb3266e42ac8bd09 Mon Sep 17 00:00:00 2001
From: Bas van Dijk <v.dijk.bas@gmail.com>
Date: Sat, 29 Oct 2011 03:38:07 +0200
Subject: [PATCH] Add extra Num constraints since the Num superclass of Bits
is removed
---
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 dccb52d..7f7b607 100644
|
a
|
b
|
|
| 744 | 744 | else restrictedDamerauLevenshteinDistance' (undefined :: Integer) n m str2 str1 |
| 745 | 745 | |
| 746 | 746 | restrictedDamerauLevenshteinDistance' |
| 747 | | :: (Bits bv) => bv -> Int -> Int -> String -> String -> Int |
| | 747 | :: (Bits bv, Num bv) => bv -> Int -> Int -> String -> String -> Int |
| 748 | 748 | restrictedDamerauLevenshteinDistance' _bv_dummy m n str1 str2 |
| 749 | 749 | | [] <- str1 = n |
| 750 | 750 | | otherwise = extractAnswer $ |
| … |
… |
|
| 757 | 757 | extractAnswer (_, _, _, _, distance) = distance |
| 758 | 758 | |
| 759 | 759 | restrictedDamerauLevenshteinDistanceWorker |
| 760 | | :: (Bits bv) => IM.IntMap bv -> bv -> bv |
| | 760 | :: (Bits bv, Num bv) => IM.IntMap bv -> bv -> bv |
| 761 | 761 | -> (bv, bv, bv, bv, Int) -> Char -> (bv, bv, bv, bv, Int) |
| 762 | 762 | restrictedDamerauLevenshteinDistanceWorker str1_mvs top_bit_mask vector_mask |
| 763 | 763 | (pm, d0, vp, vn, distance) char2 |
| … |
… |
|
| 786 | 786 | sizedComplement :: Bits bv => bv -> bv -> bv |
| 787 | 787 | sizedComplement vector_mask vect = vector_mask `xor` vect |
| 788 | 788 | |
| 789 | | matchVectors :: Bits bv => String -> IM.IntMap bv |
| | 789 | matchVectors :: (Bits bv, Num bv) => String -> IM.IntMap bv |
| 790 | 790 | matchVectors = snd . foldl' go (0 :: Int, IM.empty) |
| 791 | 791 | where |
| 792 | 792 | go (ix, im) char = let ix' = ix + 1 |