【发布时间】:2014-01-10 21:32:32
【问题描述】:
我有以下模块签名A:
module type A =
sig
type exp =
Int of int
| Var of string
end;;
我可以编译它以获得a.mli 和a.cmi 文件。但是,如果我定义B:
module type B =
sig
val compute : A.exp -> A.exp
end;;
运行ocamlc -i b.ml 会产生错误Unbound type constructor A.exp。这是为什么呢?
【问题讨论】:
标签: compilation dependencies ocaml signature