5
有没有办法AutoOpen一个外部定义的模块?我希望它在整个项目中都可用,而无需在每个文件中打开它。这样的事情将是理想的:AutoOpen外部定义的模块
[<AutoOpen>]
module MyModule = YourNamespace.YourModule //ERROR: Ignoring attributes on module abbreviation
我想这太,这将(假设)做出一个新的模块的公共接口的外部定义模块的一部分。
module MyModule =
module public YourModule = YourNamespace.YourModule //ERROR: Ignoring accessibility attribute on module abbreviation. Module abbreviations are always private.
这是一个很好的问题 - 它将使感,让这一点。另一种方法是让一些编译器参数自动打开命名空间/模块,但我认为目前没有。 – 2011-06-07 16:41:11