【发布时间】:2012-10-26 19:27:29
【问题描述】:
给定以下源文件:
(* /tmp/src/A.mli *)
val f : B.t -> B.t
(* /tmp/src/A.ml *)
let f (x : B.t) = x
(* /tmp/src/B.mli *)
type t
(* /tmp/src/B.ml *)
type t = int
我尝试运行 mascot 代码检查器,但它无法绑定从 .mli 文件引用的模块,尽管有 -I 标志。它可以很好地解析来自.ml 文件的绑定。
$ mascot.native -config mascot.cfg -I /tmp/src /tmp/src/{A,B}.{ml,mli} -html /tmp/outFile "/tmp/src/A.mli", line 2, characters 8-11:Error: Unbound module Bloading configuration files...configuring checks...analyzing dependencies... running checks...reporting to "/tmp/out" with output "html"...
它可以很好地解析来自 .ml 文件的绑定。
$ mascot.native -config mascot.cfg -I /tmp/src /tmp/src/{A,B}.ml -html /tmp/out
loading configuration files...
configuring checks...
analyzing dependencies...
running checks...
reporting to "/tmp/out" with output "html"...
我在 manual 中找不到任何解释 files-to-analyze 的内容,但我相信 Mascot 应该在接口文件上运行,因为 examples 页面包含文档示例问题:
(** Module descriptoion. *) type t (* This one is not actually documented (bare comment instead of ocamldoc one). *)
当我只提供源文件时,似乎没有运行接口检查。
【问题讨论】:
标签: ocaml