Mercurial > urweb
annotate tests/functor.lac @ 42:b3fbbc6cb1e5
Elaborating 'where'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 19 Jun 2008 16:35:40 -0400 |
parents | 1405d8c26790 |
children | d94c484337d0 |
rev | line source |
---|---|
adamc@40 | 1 signature S = sig |
adamc@40 | 2 type t |
adamc@40 | 3 val z : t |
adamc@40 | 4 val s : t -> t |
adamc@40 | 5 end |
adamc@40 | 6 |
adamc@40 | 7 signature T = sig |
adamc@40 | 8 type t |
adamc@40 | 9 val three : t |
adamc@40 | 10 end |
adamc@40 | 11 |
adamc@42 | 12 functor F (M : S) : T where type t = M.t = struct |
adamc@41 | 13 type t = M.t |
adamc@40 | 14 val three = M.s (M.s (M.s M.z)) |
adamc@40 | 15 end |