Skip to content

Commit 1bea321

Browse files
KevinRansombaronfel
authored andcommitted
FX_NO_SYSTEM_CONSOLE and EXTRAS_FOR_SILVERLIGHT_COMPILER are never set (#7549)
1 parent 44ca3eb commit 1bea321

File tree

7 files changed

+3
-33
lines changed

7 files changed

+3
-33
lines changed

src/fsharp/FSharp.Core/Query.fs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,6 @@ module Query =
18041804
let linqQuery = TransInnerWithFinalConsume canElim queryProducingSequence
18051805
let linqQueryAfterEliminatingNestedQueries = EliminateNestedQueries linqQuery
18061806

1807-
#if !FX_NO_SYSTEM_CONSOLE
18081807
#if DEBUG
18091808
let debug() =
18101809
Printf.printfn "----------------------queryProducingSequence-------------------------"
@@ -1814,20 +1813,17 @@ module Query =
18141813
Printf.printfn "--------------------------linqQuery (after nested)-------------------"
18151814
Printf.printfn "%A" linqQueryAfterEliminatingNestedQueries
18161815
#endif
1817-
#endif
18181816

18191817

18201818
let result =
18211819
try
18221820
LeafExpressionConverter.EvaluateQuotation linqQueryAfterEliminatingNestedQueries
18231821
with e ->
1824-
#if !FX_NO_SYSTEM_CONSOLE
18251822
#if DEBUG
18261823
debug()
18271824
Printf.printfn "--------------------------error--------------------------------------"
18281825
Printf.printfn "%A" (e.ToString())
18291826
Printf.printfn "---------------------------------------------------------------------"
1830-
#endif
18311827
#endif
18321828
reraise ()
18331829

src/fsharp/FSharp.Core/fslib-extra-pervasives.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ module ExtraTopLevelOperators =
227227
[<CompiledName("PrintFormatLineToTextWriter")>]
228228
let fprintfn (textWriter:TextWriter) format = Printf.fprintfn textWriter format
229229

230-
#if !FX_NO_SYSTEM_CONSOLE
231230
[<CompiledName("PrintFormat")>]
232231
let printf format = Printf.printf format
233232

@@ -239,7 +238,6 @@ module ExtraTopLevelOperators =
239238

240239
[<CompiledName("PrintFormatLineToError")>]
241240
let eprintfn format = Printf.eprintfn format
242-
#endif
243241

244242
[<CompiledName("FailWith")>]
245243
let failwith s = raise (Failure s)

src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module ExtraTopLevelOperators =
1212
open Microsoft.FSharp.Collections
1313
open Microsoft.FSharp.Text
1414

15-
#if !FX_NO_SYSTEM_CONSOLE
1615
/// <summary>Print to <c>stdout</c> using the given format.</summary>
1716
/// <param name="format">The formatter.</param>
1817
/// <returns>The formatted result.</returns>
@@ -36,7 +35,6 @@ module ExtraTopLevelOperators =
3635
/// <returns>The formatted result.</returns>
3736
[<CompiledName("PrintFormatLineToError")>]
3837
val eprintfn : format:Printf.TextWriterFormat<'T> -> 'T
39-
#endif
4038

4139
/// <summary>Print to a string using the given format.</summary>
4240
/// <param name="format">The formatter.</param>

src/fsharp/FSharp.Core/prim-types.fs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4335,7 +4335,6 @@ namespace Microsoft.FSharp.Core
43354335
[<CompiledName("Identity")>]
43364336
let id x = x
43374337

4338-
#if !FX_NO_SYSTEM_CONSOLE
43394338
// std* are TypeFunctions with the effect of reading the property on instantiation.
43404339
// So, direct uses of stdout should capture the current System.Console.Out at that point.
43414340
[<CompiledName("ConsoleIn")>]
@@ -4346,10 +4345,8 @@ namespace Microsoft.FSharp.Core
43464345

43474346
[<CompiledName("ConsoleError")>]
43484347
let stderr<'T> = System.Console.Error
4349-
#endif
4350-
43514348

4352-
module Unchecked =
4349+
module Unchecked =
43534350

43544351
[<CompiledName("Unbox")>]
43554352
let inline unbox<'T> (v:obj) = unboxPrim<'T> v

src/fsharp/FSharp.Core/prim-types.fsi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,10 +2360,9 @@ namespace Microsoft.FSharp.Core
23602360
[<CompiledName("NaNSingle")>]
23612361
val nanf: float32
23622362

2363-
#if !FX_NO_SYSTEM_CONSOLE
23642363
/// <summary>Reads the value of the property <c>System.Console.In</c>. </summary>
23652364
[<CompiledName("ConsoleIn")>]
2366-
val stdin<'T> : System.IO.TextReader
2365+
val stdin<'T> : System.IO.TextReader
23672366

23682367
/// <summary>Reads the value of the property <c>System.Console.Error</c>. </summary>
23692368
[<CompiledName("ConsoleError")>]
@@ -2372,7 +2371,6 @@ namespace Microsoft.FSharp.Core
23722371
/// <summary>Reads the value of the property <c>System.Console.Out</c>.</summary>
23732372
[<CompiledName("ConsoleOut")>]
23742373
val stdout<'T> : System.IO.TextWriter
2375-
#endif
23762374

23772375
/// <summary>The standard overloaded range operator, e.g. <c>[n..m]</c> for lists, <c>seq {n..m}</c> for sequences</summary>
23782376
/// <param name="start">The start value of the range.</param>

src/fsharp/FSharp.Core/printf.fs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,20 +1645,6 @@ module Printf =
16451645
[<CompiledName("PrintFormatToStringThenFail")>]
16461646
let failwithf format = ksprintf failwith format
16471647

1648-
#if !FX_NO_SYSTEM_CONSOLE
1649-
#if EXTRAS_FOR_SILVERLIGHT_COMPILER
1650-
[<CompiledName("PrintFormat")>]
1651-
let printf format = fprintf (!outWriter) format
1652-
1653-
[<CompiledName("PrintFormatToError")>]
1654-
let eprintf format = fprintf (!errorWriter) format
1655-
1656-
[<CompiledName("PrintFormatLine")>]
1657-
let printfn format = fprintfn (!outWriter) format
1658-
1659-
[<CompiledName("PrintFormatLineToError")>]
1660-
let eprintfn format = fprintfn (!errorWriter) format
1661-
#else
16621648
[<CompiledName("PrintFormat")>]
16631649
let printf format = fprintf Console.Out format
16641650

@@ -1670,5 +1656,3 @@ module Printf =
16701656

16711657
[<CompiledName("PrintFormatLineToError")>]
16721658
let eprintfn format = fprintfn Console.Error format
1673-
#endif
1674-
#endif

src/fsharp/FSharp.Core/printf.fsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ module Printf =
183183
[<CompiledName("PrintFormatLineToTextWriter")>]
184184
val fprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T
185185

186-
#if !FX_NO_SYSTEM_CONSOLE
187186
/// <summary>Formatted printing to stderr</summary>
188187
/// <param name="format">The input formatter.</param>
189188
/// <returns>The return type and arguments of the formatter.</returns>
@@ -207,7 +206,7 @@ module Printf =
207206
/// <returns>The return type and arguments of the formatter.</returns>
208207
[<CompiledName("PrintFormatLine")>]
209208
val printfn : format:TextWriterFormat<'T> -> 'T
210-
#endif
209+
211210
/// <summary>Print to a string via an internal string buffer and return
212211
/// the result as a string. Helper printers must return strings.</summary>
213212
/// <param name="format">The input formatter.</param>

0 commit comments

Comments
 (0)