comparison tests/sig_impl.lac @ 78:a6d45c6819c9

Implicit structure members
author Adam Chlipala <adamc@hcoop.net>
date Sun, 29 Jun 2008 11:05:38 -0400
parents
children 37847b504cc6
comparison
equal deleted inserted replaced
77:a1026ae076ea 78:a6d45c6819c9
1 signature S = sig
2 type t
3 val x : t
4 end
5
6 structure M : S = struct
7 val x = 0
8 end
9
10 signature S = sig
11 con r :: {Type}
12 val x : $r
13 end
14
15 structure M : S = struct
16 val x = {A = 0, B = "Hi"}
17 end
18
19 signature S = sig
20 type t
21 con r :: {Type}
22 val x : t -> $r
23 end
24
25 structure M : S = struct
26 val x = fn v : int => {A = 0, B = "Hi"}
27 end