adam@1989: functor F1(M : sig type t end) = struct
adam@1989: type t = M.t
adam@1989: fun g () : M.t = g ()
adam@1989: fun f () = g ()
adam@1989: end
adam@1989: functor F2(M : sig type t end) = F1(M)
adam@1989: functor F3(M : sig type t end) = F2(M)
adam@1989:
adam@1989: functor F4(M : sig end) = F1(struct type t = int end)
adam@1989: functor F5(M : sig end) = F2(struct type t = int end)
adam@1989: functor F6(M : sig end) = F3(struct type t = int end)
adam@1989:
adam@1989: functor F7(M : sig end) = F1(struct type t = string end)
adam@1989: functor F8(M : sig end) = F2(struct type t = string end)
adam@1989: functor F9(M : sig end) = F3(struct type t = string end)
adam@1989:
adam@1989: structure M1 = F1(struct type t = string end)
adam@1989: structure M2 = F2(struct type t = string end)
adam@1989: structure M3 = F3(struct type t = string end)
adam@1989:
adam@1989: structure M4 = F4(struct end)
adam@1989: structure M5 = F5(struct end)
adam@1989: structure M6 = F6(struct end)
adam@1989:
adam@1989: structure M7 = F7(struct end)
adam@1989: structure M8 = F8(struct end)
adam@1989: structure M9 = F9(struct end)
adam@1989:
adam@1989: fun loop x : unit = loop (M1.f (), M2.f (), M3.f (),
adam@1989: M4.f (), M5.f (), M6.f (),
adam@1989: M7.f (), M8.f (), M9.f ())
adam@1989:
adam@1989: fun main () : transaction page =
adam@1989: x <- error ;
adam@1989: u <- return (loop x);
adam@1989: return