Commit 5428d110 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Remove hash001, as we no longer have Data.HashTable

parent 9557f5f1
......@@ -20,7 +20,6 @@ test('data-fixed-show-read', normal, compile_and_run, [''])
test('showDouble', normal, compile_and_run, [''])
test('readDouble001', normal, compile_and_run, [''])
test('readInteger001', normal, compile_and_run, [''])
test('hash001', normal, compile_and_run, [''])
test('lex001', normal, compile_and_run, [''])
test('take001', extra_run_opts('1'), compile_and_run, [''])
test('genericNegative001', extra_run_opts('-1'), compile_and_run, [''])
......
import Data.HashTable
import qualified Data.HashTable as HT
test :: Int -> IO ()
test n = do ht <- new (==) hashInt
sequence_ [ insert ht key 0 | key <- [0..n]]
sequence_ [ insert ht key 1 | key <- [0..n]]
let check key = do (Just val) <- HT.lookup ht key
if val==1 then return ()
else putStrLn $ show key
sequence_ [ check key | key <- [0..n]]
main = test 2048
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment