projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git]
/
ghc
/
interpreter
/
test
/
exts
/
refs1.hs
1
--!!! Testing Refs
2
import IOExts
3
4
a1 =
5
newIORef 'a' >>= \ v ->
6
readIORef v >>= \ x ->
7
print x
8
9
a2 =
10
newIORef 'a' >>= \ v ->
11
writeIORef v 'b' >>
12
readIORef v >>= \ x ->
13
print x
14
15
a3 =
16
newIORef 'a' >>= \ v1 ->
17
newIORef 'a' >>= \ v2 ->
18
print (v1 == v1, v1 == v2, v2 == v2)
19
20