1

我想在包含a.ml(有定义something)的目录中启动 utop 并能够进入A.somethingutop。我知道我可以做到#use "a.ml",但这会污染全局命名空间。如何使完全限定名称A.something在 utop 中工作?

4

1 回答 1

3

根据#help

#mod_use <str>
  Usage is identical to #use but #mod_use wraps the contents in a module.

所以#mod_use "a.ml"应该这样做。

于 2019-01-27T03:34:54.350 回答