1 signature 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
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 ^
")"
14 val s
= S
'.pr (fn s
=> s
) (Int.toString
) (S
'.A("hello",5))
16 val _
= print (s ^
"\n")