annotate demo/ref.ur @ 539:e6b464e48c00

selfify
author Adam Chlipala <adamc@hcoop.net>
date Sat, 29 Nov 2008 14:32:33 -0500
parents b393c2fc80f8
children aa2290c32ce2
rev   line source
adamc@419 1 structure IR = RefFun.Make(struct
adamc@419 2 type t = int
adamc@419 3 end)
adamc@419 4
adamc@419 5 structure SR = RefFun.Make(struct
adamc@419 6 type t = string
adamc@419 7 end)
adamc@419 8
adamc@419 9 fun main () =
adamc@419 10 ir <- IR.new 3;
adamc@419 11 ir' <- IR.new 7;
adamc@419 12 sr <- SR.new "hi";
adamc@419 13
adamc@434 14 IR.write ir' 10;
adamc@419 15
adamc@419 16 iv <- IR.read ir;
adamc@419 17 iv' <- IR.read ir';
adamc@419 18 sv <- SR.read sr;
adamc@419 19
adamc@434 20 IR.delete ir;
adamc@434 21 IR.delete ir';
adamc@434 22 SR.delete sr;
adamc@419 23
adamc@419 24 return <xml><body>
adamc@419 25 {[iv]}, {[iv']}, {[sv]}
adamc@419 26 </body></xml>