diff --git a/fsxc/Fsxc.fs b/fsxc/Fsxc.fs index 5dc69dd..06b4bbf 100644 --- a/fsxc/Fsxc.fs +++ b/fsxc/Fsxc.fs @@ -580,13 +580,15 @@ module Program = | Some location -> location #endif - let initialInjectedContents = - """module FsxScript + let initialFileContent = + """[] +module FsxScriptInit type FsiStub = { CommandLineArgs: array } let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() } """ let autogeneratedFile = GetAutoGenerationTargets origScript "fs" + let initFile = GetAutoGenerationTargets origScript "init.fs" let binFolder = autogeneratedFile.Directory @@ -597,11 +599,16 @@ let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() } File.WriteAllText( autogeneratedFile.FullName, - initialInjectedContents + """module FsxScript +""" ) + File.WriteAllText(initFile.FullName, initialFileContent) + seq { + yield CompilerInput.SourceFile initFile + let startCommentInFSharp = "// " for maybeDep in contents do