comparison tests/datatypeMod.lac @ 163:80192edca30d

Datatypes through corify
author Adam Chlipala <adamc@hcoop.net>
date Tue, 29 Jul 2008 13:16:21 -0400
parents 870e8abbe3b9
children
comparison
equal deleted inserted replaced
162:06a98129b23f 163:80192edca30d
1 structure M : sig datatype t = A | B end = struct 1 structure M : sig datatype t = A | B end = struct
2 datatype t = A | B 2 datatype t = A | B
3 end 3 end
4 4
5 val a = M.A 5 val ac = M.A
6 6
7 datatype u = datatype M.t 7 datatype u = datatype M.t
8 8
9 val a : M.t = A 9 val ac : M.t = A
10 val a2 : u = a 10 val a2 : u = ac
11 11
12 structure M2 = M 12 structure M2 = M
13 structure M3 : sig datatype t = datatype M.t end = M2 13 structure M3 : sig datatype t = datatype M.t end = M2
14 structure M4 : sig datatype t = datatype M.t end = M 14 structure M4 : sig datatype t = datatype M.t end = M
15 15
16 val b : M3.t = M4.B 16 val bc : M3.t = M4.B
17 17
18 structure Ma : sig type t end = M 18 structure Ma : sig type t end = M
19 19
20 structure Magain : sig datatype t = A | B end = M 20 structure Magain : sig datatype t = A | B end = M
21
22 val page : M.t -> page = fn x => <html><body>
23 Hi.
24 </body></html>
25
26 val main : unit -> page = fn () => <html><body>
27 <a link={page a2}>Link</a>
28 </body></html>