Skip to content

Commit f18a2f1

Browse files
author
Dave Thomas
committed
Update Interface definition
1 parent 32c9c2a commit f18a2f1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

src/fsharp/vs/service.fsi

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77

88
namespace Microsoft.FSharp.Compiler.SourceCodeServices
99
open System
10+
open System.IO
1011
open System.Collections.Generic
1112

1213
open Microsoft.FSharp.Compiler
14+
open Microsoft.FSharp.Compiler.Ast
15+
open Microsoft.FSharp.Compiler.Driver
16+
open Microsoft.FSharp.Compiler.ErrorLogger
1317
open Microsoft.FSharp.Compiler.Range
1418
open Microsoft.FSharp.Compiler.TcGlobals
1519
open Microsoft.FSharp.Compiler.NameResolution
@@ -383,6 +387,15 @@ type FSharpProjectOptions =
383387
type IsResultObsolete =
384388
| IsResultObsolete of (unit->bool)
385389

390+
module internal CompileHelpers =
391+
val mkCompilationErorHandlers : unit -> List<FSharpErrorInfo> * ErrorLogger * ErrorLoggerProvider
392+
val tryCompile : errorLogger:ErrorLogger -> f:(Exiter -> unit) -> int
393+
val compileFromArgs : argv:string [] * tcImportsCapture:(TcImports -> unit) option * dynamicAssemblyCreator:(TcConfig * AbstractIL.IL.ILGlobals * ErrorLogger * string * string option * AbstractIL.IL.ILModuleDef * SigningInfo -> unit) option -> FSharpErrorInfo [] * int
394+
val compileFromAsts : asts:ParsedInput list * assemblyName:string * outFile:string * dependencies:string list * noframework:bool * pdbFile:string option * executable:bool option * tcImportsCapture:(TcImports -> unit) option * dynamicAssemblyCreator:(TcConfig * AbstractIL.IL.ILGlobals * ErrorLogger * string * string option * AbstractIL.IL.ILModuleDef * SigningInfo -> unit) option -> FSharpErrorInfo [] * int
395+
val dynamicAssemblyCreator<'a,'b,'c,'d,'e> : debugInfo:bool * tcImportsRef:TcImports option ref * execute:'a option * assemblyBuilderRef:Reflection.Emit.AssemblyBuilder option ref -> _tcConfig:'b * ilGlobals:AbstractIL.IL.ILGlobals * _errorLogger:'c * outfile:string * _pdbfile:'d * ilxMainModule:AbstractIL.IL.ILModuleDef * _signingInfo:'e -> unit
396+
val setOutputStreams : execute:(#TextWriter * #TextWriter) option -> unit
397+
398+
386399
/// The result of calling TypeCheckResult including the possibility of abort and background compiler not caught up.
387400
[<RequireQualifiedAccess>]
388401
type FSharpCheckFileAnswer =
@@ -588,6 +601,29 @@ type FSharpChecker =
588601
/// <param name="options">The options for the project or script, used to determine active --define conditionals and other options relevant to parsing.</param>
589602
member GetBackgroundCheckResultsForFileInProject : filename : string * options : FSharpProjectOptions -> Async<FSharpParseFileResults * FSharpCheckFileResults>
590603

604+
/// Compile using the given flags. Source files names are resolved via the FileSystem API.
605+
/// The output file must be given by a -o flag.
606+
/// The first argument is ignored and can just be "fsc.exe".
607+
member Compile: argv:string [] -> FSharpErrorInfo [] * int
608+
609+
/// TypeCheck and compile provided AST
610+
member Compile: ast:ParsedInput list * assemblyName:string * outFile:string * dependencies:string list * ?pdbFile:string * ?executable:bool * ?noframework:bool -> FSharpErrorInfo [] * int
611+
612+
/// Compiles to a dynamic assembly usinng the given flags.
613+
///
614+
/// The first argument is ignored and can just be "fsc.exe".
615+
///
616+
/// Any source files names are resolved via the FileSystem API. An output file name must be given by a -o flag, but this will not
617+
/// be written - instead a dynamic assembly will be created and loaded.
618+
///
619+
/// If the 'execute' parameter is given the entry points for the code are executed and
620+
/// the given TextWriters are used for the stdout and stderr streams respectively. In this
621+
/// case, a global setting is modified during the execution.
622+
member CompileToDynamicAssembly: otherFlags:string [] * execute:(TextWriter * TextWriter) option -> FSharpErrorInfo [] * int * System.Reflection.Assembly option
623+
624+
/// TypeCheck and compile provided AST
625+
member CompileToDynamicAssembly: ast:ParsedInput list * assemblyName:string * dependencies:string list * execute:(TextWriter * TextWriter) option * ?debug:bool * ?noframework:bool -> FSharpErrorInfo [] * int * System.Reflection.Assembly option
626+
591627
/// <summary>
592628
/// Try to get type check results for a file. This looks up the results of recent type checks of the
593629
/// same file, regardless of contents. The version tag specified in the original check of the file is returned.

0 commit comments

Comments
 (0)