Skip to content

Instantly share code, notes, and snippets.

@godfat
Created August 6, 2009 10:00
Show Gist options
  • Save godfat/163221 to your computer and use it in GitHub Desktop.
Save godfat/163221 to your computer and use it in GitHub Desktop.
-- 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