annotate tests/functor.lac @ 41:1405d8c26790

Beginning of functor elaboration
author Adam Chlipala <adamc@hcoop.net>
date Thu, 19 Jun 2008 16:04:28 -0400
parents e3d3c2791105
children b3fbbc6cb1e5
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@41 12 signature F = functor (M : S) : T
adamc@41 13
adamc@40 14 structure F = functor (M : S) : T => struct
adamc@41 15 type t = M.t
adamc@40 16 val three = M.s (M.s (M.s M.z))
adamc@40 17 end
adamc@41 18
adamc@41 19 structure F2 : F = F