adamc@185: extern structure M : sig adamc@185: datatype t = A | B adamc@185: datatype u = C of t | D adamc@185: end adamc@185: adamc@185: val f = fn x => case x of M.A => M.B | M.B => M.A adamc@185: adamc@185: val t2s = fn x => case x of M.A => "A" | M.B => "B" adamc@185: adamc@185: val g = fn x => case x of M.C a => M.C (f a) | M.D => M.C M.A adamc@185: adamc@185: val u2s = fn x => case x of M.C a => t2s a | M.D => "D" adamc@185: adamc@185: val page = fn x =>
adamc@185: {cdata (t2s x)} adamc@185: adamc@185: adamc@185: val page2 = fn x => adamc@185: {cdata (u2s x)} adamc@185: adamc@185: adamc@185: val main : unit -> page = fn () => adamc@185: