Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / regression / constraint.sml
CommitLineData
7f918cf1
CE
1signature S = sig type ('a, 'b) t
2 val A : 'a * int -> ('a, int) t
3 val pr : ('a -> string) -> ('b -> string) -> ('a, 'b) t -> string
4 end
5
6structure S =
7 struct
8 datatype ('a, 'b) t = A of 'a * 'b
9 fun pr pr_a pr_b (A(a,b)) = "A(" ^ pr_a a ^ "," ^ pr_b b ^ ")"
10 end
11
12structure S' = S : S
13
14val s = S'.pr (fn s => s) (Int.toString) (S'.A("hello",5))
15
16val _ = print (s ^ "\n")