annotate tests/caseMod.lac @ 174:7ee424760d2f

Elaborating module constructor patterns; parsing record patterns
author Adam Chlipala <adamc@hcoop.net>
date Thu, 31 Jul 2008 11:28:55 -0400
parents
children 5d030ee143e2
rev   line source
adamc@174 1 structure M = struct
adamc@174 2 datatype t = A | B
adamc@174 3 end
adamc@174 4
adamc@174 5 val f = fn x : M.t => case x of M.A => M.B | M.B => M.A
adamc@174 6
adamc@174 7 datatype t = datatype M.t
adamc@174 8
adamc@174 9 val g = fn x : t => case x of M.A => B | B => M.A
adamc@174 10
adamc@174 11 structure N = struct
adamc@174 12 datatype t = C of t | D
adamc@174 13 end
adamc@174 14
adamc@174 15 val h = fn x : N.t => case x of N.C x => x | N.D => M.A
adamc@174 16
adamc@174 17 datatype u = datatype N.t
adamc@174 18
adamc@174 19 val i = fn x : u => case x of N.C x => x | D => M.A