diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-10-23 17:35:10 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-10-23 17:35:10 -0400 |
commit | da7b52ba28367cf2b31476e77e1a26e53e4765e4 (patch) | |
tree | 5de8de2f16499f80ffe6cd1cb7bc2afb6ca851d4 /demo/ref.ur | |
parent | a2495d384c7747a079cb0f4bc31f44d626391068 (diff) |
Fix bug with bringing functor argument instances into scope; Ref demo, minus prose
Diffstat (limited to 'demo/ref.ur')
-rw-r--r-- | demo/ref.ur | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/demo/ref.ur b/demo/ref.ur new file mode 100644 index 00000000..089529e3 --- /dev/null +++ b/demo/ref.ur @@ -0,0 +1,28 @@ +structure IR = RefFun.Make(struct + type t = int + val inj = _ + end) + +structure SR = RefFun.Make(struct + type t = string + val inj = _ + end) + +fun main () = + ir <- IR.new 3; + ir' <- IR.new 7; + sr <- SR.new "hi"; + + () <- IR.write ir' 10; + + iv <- IR.read ir; + iv' <- IR.read ir'; + sv <- SR.read sr; + + () <- IR.delete ir; + () <- IR.delete ir'; + () <- SR.delete sr; + + return <xml><body> + {[iv]}, {[iv']}, {[sv]} + </body></xml> |