summaryrefslogtreecommitdiff
path: root/tests/functor.lac
blob: 1eef5383e46dc0b3ac5f69edced239af5bc879cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
signature S = sig
        type t
        val z : t
        val s : t -> t
end

signature T = sig
        type t
        val three : t
end

signature F = functor (M : S) : T

structure F = functor (M : S) : T => struct
        type t = M.t
        val three = M.s (M.s (M.s M.z))
end

structure F2 : F = F