author | wenzelm |
Tue, 28 Aug 2007 19:45:45 +0200 | |
changeset 24464 | 58d24cbe5fa6 |
parent 24421 | acfb2413faa3 |
child 24628 | 33137422d7fd |
permissions | -rw-r--r-- |
structure Nat = struct datatype nat = Suc of nat | Zero_nat; end; (*struct Nat*) structure Codegen = struct type 'a null = {null : 'a}; fun null (A_:'a null) = #null A_; fun head B_ (x :: xs) = x | head B_ [] = null B_; fun null_option () = {null = NONE} : ('b option) null; val dummy : Nat.nat option = head (null_option ()) [SOME (Nat.Suc Nat.Zero_nat), NONE]; end; (*struct Codegen*)