Created
August 6, 2009 10:00
-
-
Save godfat/163221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- output 2 | |
module TestHash where | |
import GHC.Int | |
import Data.HashTable as HashTable | |
import Data.Maybe as Maybe | |
hash :: IO (HashTable Int32 Int32) | |
hash = new (==) id | |
main = do | |
h <- hash | |
insert h 1 2 | |
v <- HashTable.lookup h 1 | |
putStrLn $ show $ Maybe.fromJust v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment