comparison tests/subsig.lac @ 60:8bce148070a7

Subsignatures example
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Jun 2008 19:10:47 -0400
parents
children
comparison
equal deleted inserted replaced
59:abb2b32c19fb 60:8bce148070a7
1 structure M = struct
2 signature S = sig
3 type t
4 end
5 end
6
7 structure N : M.S = struct
8 type t = int
9 end
10
11 structure M' = struct
12 type t = int
13 val y = 42
14
15 signature S = sig
16 val x : t
17 end
18 end
19
20 structure N' : M'.S = struct
21 val x = 0
22 end
23
24 signature S = sig
25 type t
26 val y : t
27
28 signature S = sig
29 val x : t
30 end
31 end
32
33 structure M'S : S = M'
34
35 structure V : M'S.S = struct
36 val x = M'S.y
37 end
38
39 structure M'S' = M'S
40
41 structure V : M'S'.S = struct
42 val x = M'S.y
43 end