Typo
[packages/base.git] / tests / stableptr005.hs
1 -- !!! triggered a temporary bug in freeStablePtr around 20020424
2
3 module Main where
4 import Foreign.StablePtr (newStablePtr, freeStablePtr)
5
6 data Foo = A | B | C | D
7
8 main :: IO ()
9 main = do aSPtr <- newStablePtr A
10 bSPtr <- newStablePtr B
11 cSPtr <- newStablePtr C
12 cSPtr' <- newStablePtr C
13 freeStablePtr aSPtr
14 freeStablePtr bSPtr
15 freeStablePtr cSPtr
16 freeStablePtr cSPtr'
17 aSPtr <- newStablePtr A
18 bSPtr <- newStablePtr B
19 cSPtr <- newStablePtr C
20 dSPtr <- newStablePtr D
21 print "Hello World"
22