annotate tests/functor.lac @ 40:e3d3c2791105

Functor parsing
author Adam Chlipala <adamc@hcoop.net>
date Thu, 19 Jun 2008 15:15:00 -0400
parents
children 1405d8c26790
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@40 12 structure F = functor (M : S) : T => struct
adamc@40 13 val t = M.t
adamc@40 14 val three = M.s (M.s (M.s M.z))
adamc@40 15 end