13 datatype ('a
, 'b
) t
= T
of 'a
16 datatype ('b
, 'a
) t
= T
of 'b
42 structure S
: S1
where type t
= u
53 structure S
: S1
where type t
= u
59 end where type t
= int
119 functor F () = struct end
121 functor F (type t
) = struct type u
= t
end
123 functor F (val x
: int) = struct val y
= x
end
125 functor F (structure S
: sig end) = struct open S
end
129 sharing type t
= u
) =
131 val id
: t
-> u
= fn x
=> x
134 functor F (eqtype t
) = struct fun f (x
: t
) = x
= x
end
136 functor F (structure S
:
146 val id
: S
.t
-> T
.t
= fn x
=> x
149 functor F (datatype 'a t
= T
of 'a
* 'a
) =
154 functor F (type ('a
, 'b
) t
155 type 'a u
= ('a
, int) t
156 val f
: (bool, 'b
) t
-> real
162 functor F (datatype t
= T
163 datatype u
= U
of t
) =
194 val f
: ''a
-> ''a list
212 val f
: 'a list
-> 'a list
217 val z
= S
.f
[1, 2, 3]
219 structure S
= struct datatype t
= T
end
228 datatype t
= datatype t
234 signature SIG
= sig type t
end
235 functor F (S
: sig type t
end): SIG
= S
238 structure T
: sig type t
end
240 sharing type T
.t
= U
.t
243 structure T
= struct type t
= unit
end
244 structure U
= F (type t
= unit
)
246 val f
= fn z
: S
.T
.t
=> z
: S
.U
.t
259 val _
= fn x
: LargeInt
.int => x
: IntInf
.int
272 include S
where type t
= S
.t
279 val _
: T
.t
-> S
.t
= fn x
=> x
285 end where type v
= int