Permalink
Browse files

Fix defaulting to type integer

  • Loading branch information...
1 parent 1fb7f46 commit f711d09729e9388dc21af7cab9a4219df2f118cc @gregorycollins committed Nov 24, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Data/HashTable/Internal/CacheLine.hs
View
8 src/Data/HashTable/Internal/CacheLine.hs
@@ -234,11 +234,11 @@ prefetchWrite _ _ = return ()
{-# INLINE forwardSearch2 #-}
forwardSearch2 :: IntArray s -> Int -> Int -> Int -> Int -> ST s Int
-forwardSearch2 !vec !start !end !x1 !x2 = go start end 0
+forwardSearch2 !vec !start !end !x1 !x2 = go start end False
where
next !i !e !b = let !j = i+1
in if j == e
- then (if b > 0 then (-1,e,1) else (0,start,1))
+ then (if b then (-1,e,True) else (0,start,True))
else (j,e,b)
go !i !e !b = do
@@ -252,11 +252,11 @@ forwardSearch2 !vec !start !end !x1 !x2 = go start end 0
{-# INLINE forwardSearch3 #-}
forwardSearch3 :: IntArray s -> Int -> Int -> Int -> Int -> Int -> ST s Int
-forwardSearch3 !vec !start !end !x1 !x2 !x3 = go start end 0
+forwardSearch3 !vec !start !end !x1 !x2 !x3 = go start end False
where
next !i !e !b = let !j = i+1
in if j == e
- then (if b > 0 then (-1,e,1) else (0,start,1))
+ then (if b then (-1,e,True) else (0,start,True))
else (j,e,b)
go !i !e !b = do

0 comments on commit f711d09

Please sign in to comment.