1(* test signature constraints *) 2signature OK = sig type t end where type t = int; 3signature OK = sig structure X : sig type t end 4 end where type X.t = int; 5signature OK = sig structure Y : sig structure X : sig type t end 6 end 7 end where type Y.X.t = int; 8 9signature OK = sig type t 10 type u 11 sharing type t = u 12 end; 13signature OK = sig type u 14 type t 15 sharing type t = u 16 end; 17 18signature OK = sig structure X : sig 19 type t 20 type u 21 end 22 type u 23 sharing type X.t = X.u = u 24 end; 25 26signature OK = sig structure Y : sig 27 structure X : sig type t 28 type u 29 end 30 type u 31 end 32 type u 33 sharing type Y.X.t = Y.X.u = Y.u = u 34 end; 35 36signature OK = sig 37 structure Y : sig structure X : sig type t type u end type u type a end 38 structure Z : 39 sig 40 structure Y : sig structure X : sig type t type u end type u type v end 41 end 42 structure W : sig type u type v end; 43 sharing Y = Z.Y = W 44 end; 45 46 47(* cvr: TODO need failure tests *) 48