From: Malcolm.Wallace@cs.york.ac.uk Date: Fri, 18 Aug 2006 13:08:10 +0000 (+0000) Subject: use Haskell'98 compliant indentation in do blocks X-Git-Url: http://git.megacz.com/?p=haskell-directory.git;a=commitdiff_plain;h=1a3710614eec1bba6f241f44e9bf84249d43b58d use Haskell'98 compliant indentation in do blocks --- diff --git a/Data/HashTable.hs b/Data/HashTable.hs index ddbc24b..8ea7909 100644 --- 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 -- - 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 - 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