Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在包含a.ml(有定义something)的目录中启动 utop 并能够进入A.somethingutop。我知道我可以做到#use "a.ml",但这会污染全局命名空间。如何使完全限定名称A.something在 utop 中工作?
a.ml
something
A.something
#use "a.ml"
根据#help:
#help
#mod_use <str> Usage is identical to #use but #mod_use wraps the contents in a module.
所以#mod_use "a.ml"应该这样做。
#mod_use "a.ml"