How to use the nested module in OCaml object files
"Zhang Hengruo [email protected] [ocaml_beginners]" <[email protected]> Fri, 22 Apr 2016 14:53:50 +0800
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <CAMeL8fc3KnZhArabj-YdZxNrM4oTFRGxX7UmcdcWfHuUYjoYgg@mail.gmail.com> |
Hi all,
I'm writing a Coq plugin and I need some functions in Coq source. For
example,
module Named :sig
module Declaration :
sig
type t = LocalAssum of Id.t * Constr.t
| LocalDef of Id.t * Constr.t * Constr.t
...
end
...end
This module is in kernel/context.ml. I want use the constructor LocalAssum
and LocalDef to parse something, but I can't use them. It seems that the
.cmi and .cma file in $COQLIB only expose the members in context.ml but not
the ones in nested modules. I've tried adding open
Context.Named.Declaration but
compiler told me "Error: Unbound module Context.Named".
Any help appreciated.
Thanks, Hengruo