Reputation: 57159
Each time I load an FSX script file (or any other file for that matter) in FSharp Interactive in Visual Studio 2015, it prints a message:
> #load "D:\Projects\Tests.fsx";;
[Loading D:\Projects\Tests.fsx]
namespace FSI_0055
It doesn't matter whether the FSX is empty, has one or more types or modules in it. The result is always the loading message (clear enough) and then the namespace FSI_00XX
message, where XX is an incremental number. I.e., if I run the above command again (with or without changes to the file) it shows this:
> #load "D:\Projects\Tests.fsx";;
[Loading D:\Projects\Tests.fsx]
namespace FSI_0056
It looks like an error, but clearly it isn't. My guess is, it is an implicit namespace, and the current namespace will be set to the latest. Does it also mean that I can refer to the previous version using the previous namespace?
Or, if not that, what does it stand for?
Note: if I use "Send to interactive" of a code snippet, this message does not appear.
Upvotes: 4
Views: 284
Reputation: 13577
Someone with more detailed knowledge of FSI internals could no doubt give you a more complete answer, but for what it's worth:
Check the code below:
type Test = T of int
// this is the FSI_XXXX type, you can inspect it for more details.
let fsiType = typeof<Test>.DeclaringType
Microsoft.FSharp.Reflection.FSharpType.IsModule fsiType // returns true
If you copy/paste and run this in the FSI window in Visual Studio, it will return something like the following:
type Test = | T of int
val fsiType : System.Type = FSI_0026
val it : bool = true
Upvotes: 3