Hi Jun,
You can achieve this by implying an extra layer of indirection, i.e., by having two levels of interfaces. For example,
* A.ml - implementation of module A
* A.mli - private interface of module A
* B.ml - implementation of module B that may rely on anything in A.mli
* Std.ml - a set of modules that you would like to import, e.g., `module A = A`, `module B = B`
* Std.mli - public interface specification
Next, you deploy `std.cmxa` and `std.cmi` but keep `a.cmi` and `b.cmi` to yourself. This will prevent users from accessing your private modules A and B directly. (In oasis you can use PrivateModules stanza for this)
Now you will have `Std.A` and `Std.B` that exposes as much as you want. Not sure whether it will work with the `-pack`, but you can use this approach instead of it. This is how we address the same issue in [BAP][1]
Cheers,
Ivan