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