Mercurial > urweb
annotate 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 |
rev | line source |
---|---|
adamc@78 | 1 signature S = sig |
adamc@78 | 2 type t |
adamc@78 | 3 val x : t |
adamc@78 | 4 end |
adamc@78 | 5 |
adamc@78 | 6 structure M : S = struct |
adamc@78 | 7 val x = 0 |
adamc@78 | 8 end |
adamc@78 | 9 |
adamc@78 | 10 signature S = sig |
adamc@78 | 11 con r :: {Type} |
adamc@78 | 12 val x : $r |
adamc@78 | 13 end |
adamc@78 | 14 |
adamc@78 | 15 structure M : S = struct |
adamc@78 | 16 val x = {A = 0, B = "Hi"} |
adamc@78 | 17 end |
adamc@78 | 18 |
adamc@78 | 19 signature S = sig |
adamc@78 | 20 type t |
adamc@78 | 21 con r :: {Type} |
adamc@78 | 22 val x : t -> $r |
adamc@78 | 23 end |
adamc@78 | 24 |
adamc@78 | 25 structure M : S = struct |
adamc@78 | 26 val x = fn v : int => {A = 0, B = "Hi"} |
adamc@78 | 27 end |