godfat (owner)

Revisions

gist: 163221 Download_button fork
public
Public Clone URL: git://gist.github.com/163221.git
Embed All Files: show embed
TestHash.hs #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- 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