Skip to content

Commit add00ea

Browse files
committed
cleanup in the FCS vs\... service API implementation
1 parent 9208824 commit add00ea

21 files changed

+1054
-1186
lines changed

src/fsharp/fsi/fsi.fs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module Microsoft.FSharp.Compiler.Interactive.Shell
88
[<assembly: System.CLSCompliant(true)>]
99
do()
1010

11-
open Internal.Utilities
1211

1312
module Tc = Microsoft.FSharp.Compiler.TypeChecker
1413

@@ -17,15 +16,12 @@ open System.Collections.Generic
1716
open System.Diagnostics
1817
open System.Globalization
1918
open System.Runtime.InteropServices
20-
open System.Runtime.CompilerServices
2119
open System.IO
2220
open System.Text
2321
open System.Threading
2422
open System.Reflection
25-
2623
open Microsoft.FSharp.Compiler
2724
open Microsoft.FSharp.Compiler.AbstractIL
28-
open Microsoft.FSharp.Compiler.AbstractIL.IL
2925
open Microsoft.FSharp.Compiler.AbstractIL.Internal
3026
open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
3127
open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX
@@ -42,16 +38,13 @@ open Microsoft.FSharp.Compiler.TypeChecker
4238
open Microsoft.FSharp.Compiler.Tast
4339
open Microsoft.FSharp.Compiler.Infos
4440
open Microsoft.FSharp.Compiler.Tastops
45-
open Microsoft.FSharp.Compiler.Optimizer
4641
open Microsoft.FSharp.Compiler.TcGlobals
4742
open Microsoft.FSharp.Compiler.CompileOps
4843
open Microsoft.FSharp.Compiler.Lexhelp
4944
open Microsoft.FSharp.Compiler.Layout
5045
open Microsoft.FSharp.Compiler.NameResolution
51-
open Microsoft.FSharp.Compiler.PostTypeCheckSemanticChecks
5246
open Microsoft.FSharp.Compiler.SourceCodeServices
53-
54-
open Internal.Utilities.Collections
47+
open Internal.Utilities
5548
open Internal.Utilities.StructuredFormat
5649

5750
//----------------------------------------------------------------------------
@@ -91,7 +84,6 @@ module internal Utilities =
9184

9285
let ignoreAllErrors f = try f() with _ -> ()
9386

94-
let referencedAssemblies = Dictionary<string, DateTime>()
9587

9688
//----------------------------------------------------------------------------
9789
// Timing support
@@ -1679,6 +1671,8 @@ type internal FsiInteractionProcessor
16791671
lexResourceManager : LexResourceManager,
16801672
initialInteractiveState) =
16811673

1674+
let referencedAssemblies = Dictionary<string, DateTime>()
1675+
16821676
let mutable currState = initialInteractiveState
16831677
let event = Event<unit>()
16841678
let setCurrState s = currState <- s; event.Trigger()

src/fsharp/lib.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ let condition _s =
2323
try (System.Environment.GetEnvironmentVariable(_s) <> null) with _ -> false
2424
#endif
2525

26+
let GetEnvInteger e dflt = match System.Environment.GetEnvironmentVariable(e) with null -> dflt | t -> try int t with _ -> dflt
27+
2628
let dispose (x:System.IDisposable) = match x with null -> () | x -> x.Dispose()
2729

2830
//-------------------------------------------------------------------------

src/fsharp/vs/Exprs.fs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
//----------------------------------------------------------------------------
2-
// Copyright (c) 2002-2012 Microsoft Corporation.
3-
//
4-
// This source code is subject to terms and conditions of the Apache License, Version 2.0. A
5-
// copy of the license can be found in the License.html file at the root of this distribution.
6-
// By using this source code in any fashion, you are agreeing to be bound
7-
// by the terms of the Apache License, Version 2.0.
8-
//
9-
// You must not remove this notice, or any other, from this software.
10-
//----------------------------------------------------------------------------
1+
// Copyright (c) Microsoft Corpration, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
112

123
namespace Microsoft.FSharp.Compiler.SourceCodeServices
134

14-
open Internal.Utilities
155
open Microsoft.FSharp.Compiler
166
open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
177
open Microsoft.FSharp.Compiler.AbstractIL.IL
@@ -23,6 +13,7 @@ open Microsoft.FSharp.Compiler.TcGlobals
2313
open Microsoft.FSharp.Compiler.Tastops
2414
open Microsoft.FSharp.Compiler.QuotationTranslator
2515
open Microsoft.FSharp.Compiler.TypeRelations
16+
open Internal.Utilities
2617

2718

2819
[<AutoOpen>]

src/fsharp/vs/Exprs.fsi

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
//----------------------------------------------------------------------------
2-
// Copyright (c) 2002-2012 Microsoft Corporation.
3-
//
4-
// This source code is subject to terms and conditions of the Apache License, Version 2.0. A
5-
// copy of the license can be found in the License.html file at the root of this distribution.
6-
// By using this source code in any fashion, you are agreeing to be bound
7-
// by the terms of the Apache License, Version 2.0.
8-
//
9-
// You must not remove this notice, or any other, from this software.
10-
//----------------------------------------------------------------------------
1+
// Copyright (c) Microsoft Corpration, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
112

123
namespace Microsoft.FSharp.Compiler.SourceCodeServices
134

0 commit comments

Comments
 (0)