Backport from sid to buster
[hcoop/debian/mlton.git] / regression / opaque2.sml
CommitLineData
7f918cf1
CE
1structure S :> sig type ('a,'b) t
2 val f : ('a,'b) t -> ('b,'a) t
3 val mk : 'a * 'b -> ('a,'b) t
4 end
5 =
6 struct
7 type ('a,'b) t = 'b * 'a
8 fun f (x,y) = (y,x)
9 fun mk (a,b) = (b,a)
10 end
11
12val a = S.mk (5, "hello")
13
14val b = S.f a