You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the script files, the following code is analysed in the editor without any errors
moduleAletx=3
but if you send this code to the FSI in any way (IDE, dotnet fsi file.fsx, dotnet fsi --use:file.fsx) FS0010: Unexpected start of structured construct in definition. Expected '=' or other token. error will occur
Either top-level modules must be allowed in execution with fsi, or the corresponding error must be shown when analyzed in the editor.
.NET 8
Rider 2024.1 RC 1, VS Code, dotnet fsi
The text was updated successfully, but these errors were encountered:
Namespace declaration groups and module definitions are not allowed in script fragments.
The FSharp spec (Page 298) says script-fragment : module-elems
And module-elems is what you find inside a module.
Having said that, I have come across this issues multiple times when moving from script to project and back. But from the little that I know about the internals of fsi, I think it won't be easy to allow modules.
In the script files, the following code is analysed in the editor without any errors
but if you send this code to the FSI in any way (IDE,
dotnet fsi file.fsx
,dotnet fsi --use:file.fsx
)FS0010: Unexpected start of structured construct in definition. Expected '=' or other token.
error will occurEither top-level modules must be allowed in execution with fsi, or the corresponding error must be shown when analyzed in the editor.
dotnet fsi
The text was updated successfully, but these errors were encountered: