Hi,

is there a way in OCaml to define nested modules where a type t of the
inner module is defined as equal to the out type of the same name?

For example, I would like to define a file outer.ml containing

type t
module Inner :
sig
  type t = t
end

but I get the error
Error: The type abbreviation t is cyclic
which kind of makes sense. Can I somehow refer to Outer.t in the Inner
module? (Outer.t does in fact not work either).

Thanks!

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to