adamc@40: signature S = sig adamc@40: type t adamc@40: val z : t adamc@40: val s : t -> t adamc@40: end adamc@40: adamc@40: signature T = sig adamc@40: type t adamc@40: val three : t adamc@40: end adamc@40: adamc@42: functor F (M : S) : T where type t = M.t = struct adamc@41: type t = M.t adamc@40: val three = M.s (M.s (M.s M.z)) adamc@40: end adamc@43: adamc@43: structure F2 : functor (M : S) : T where type t = M.t = F adamc@43: structure F3 : functor (M : S) : T = F adamc@43: (*structure F4 : functor (M : S) : sig type q end = F*) adamc@43: (*structure F5 : functor (M : S) : T where type t = int = F*)