If I compile the following module in dll
namespace MyNs
module SomeModule =
do printfn "module loading"
let x = 23
then refer to the dll in FSI and run the command open MyNs.SomeModule"Download module" does not print immediately. It prints only on access to x, which causes the execution of all the upper levels of let and do bindings (normal behavior that I know in the .NET world). Is there a way, perhaps through the module attribute, I can indicate that the module should load immediately after opening in FSI?
source
share