annotate demo/ref.ur @ 453:787d4931fb07

Almost have that nested save function compiling
author Adam Chlipala <adamc@hcoop.net>
date Sat, 01 Nov 2008 21:19:43 -0400
parents c471345f5165
children b393c2fc80f8
rev   line source
adamc@419 1 structure IR = RefFun.Make(struct
adamc@419 2 type t = int
adamc@419 3 val inj = _
adamc@419 4 end)
adamc@419 5
adamc@419 6 structure SR = RefFun.Make(struct
adamc@419 7 type t = string
adamc@419 8 val inj = _
adamc@419 9 end)
adamc@419 10
adamc@419 11 fun main () =
adamc@419 12 ir <- IR.new 3;
adamc@419 13 ir' <- IR.new 7;
adamc@419 14 sr <- SR.new "hi";
adamc@419 15
adamc@434 16 IR.write ir' 10;
adamc@419 17
adamc@419 18 iv <- IR.read ir;
adamc@419 19 iv' <- IR.read ir';
adamc@419 20 sv <- SR.read sr;
adamc@419 21
adamc@434 22 IR.delete ir;
adamc@434 23 IR.delete ir';
adamc@434 24 SR.delete sr;
adamc@419 25
adamc@419 26 return <xml><body>
adamc@419 27 {[iv]}, {[iv']}, {[sv]}
adamc@419 28 </body></xml>