summaryrefslogtreecommitdiff
path: root/tests/caseMod.lac
blob: 2c6fbc8041537c99b3aee4045737a1e8e848b532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
structure M = struct
        datatype t = A | B
end

val f = fn x : M.t => case x of M.A => M.B | M.B => M.A

datatype t = datatype M.t

val g = fn x : t => case x of M.A => B | B => M.A

structure N = struct
        datatype t = C of t | D
end

val h = fn x : N.t => case x of N.C x => x | N.D => M.A

datatype u = datatype N.t

val i = fn x : u => case x of N.C x => x | D => M.A