projects
/
haskell-directory.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
561a879
)
use Haskell'98 compliant indentation in do blocks
author
Malcolm.Wallace@cs.york.ac.uk
<unknown>
Fri, 18 Aug 2006 13:08:10 +0000
(13:08 +0000)
committer
Malcolm.Wallace@cs.york.ac.uk
<unknown>
Fri, 18 Aug 2006 13:08:10 +0000
(13:08 +0000)
Data/HashTable.hs
patch
|
blob
|
history
diff --git
a/Data/HashTable.hs
b/Data/HashTable.hs
index
ddbc24b
..
8ea7909
100644
(file)
--- a/
Data/HashTable.hs
+++ b/
Data/HashTable.hs
@@
-360,20
+360,20
@@
expandHashTable hash table@HT{ buckets=bkts, bmask=mask } = do
then return table
else do
--
then return table
else do
--
- newbkts' <- newMutArray (0,newmask) []
+ newbkts' <- newMutArray (0,newmask) []
- let
- splitBucket oldindex = do
- bucket <- readHTArray bkts oldindex
- let (oldb,newb) =
+ let
+ splitBucket oldindex = do
+ bucket <- readHTArray bkts oldindex
+ let (oldb,newb) =
partition ((oldindex==). bucketIndex newmask . hash . fst) bucket
partition ((oldindex==). bucketIndex newmask . hash . fst) bucket
- writeMutArray newbkts' oldindex oldb
- writeMutArray newbkts' (oldindex + oldsize) newb
- mapM_ splitBucket [0..mask]
+ writeMutArray newbkts' oldindex oldb
+ writeMutArray newbkts' (oldindex + oldsize) newb
+ mapM_ splitBucket [0..mask]
- newbkts <- freezeArray newbkts'
+ newbkts <- freezeArray newbkts'
- return ( table{ buckets=newbkts, bmask=newmask } )
+ return ( table{ buckets=newbkts, bmask=newmask } )
-- -----------------------------------------------------------------------------
-- Deleting a mapping from the hash table
-- -----------------------------------------------------------------------------
-- Deleting a mapping from the hash table