未验证 提交 3ce13ed4 编写于 作者: K Kevin Ransom (msft) 提交者: GitHub

FX_NO_SYSTEM_CONSOLE and EXTRAS_FOR_SILVERLIGHT_COMPILER are never set (#7549)

上级 742e8973
......@@ -1804,7 +1804,6 @@ module Query =
let linqQuery = TransInnerWithFinalConsume canElim queryProducingSequence
let linqQueryAfterEliminatingNestedQueries = EliminateNestedQueries linqQuery
#if !FX_NO_SYSTEM_CONSOLE
#if DEBUG
let debug() =
Printf.printfn "----------------------queryProducingSequence-------------------------"
......@@ -1814,20 +1813,17 @@ module Query =
Printf.printfn "--------------------------linqQuery (after nested)-------------------"
Printf.printfn "%A" linqQueryAfterEliminatingNestedQueries
#endif
#endif
let result =
try
LeafExpressionConverter.EvaluateQuotation linqQueryAfterEliminatingNestedQueries
with e ->
#if !FX_NO_SYSTEM_CONSOLE
#if DEBUG
debug()
Printf.printfn "--------------------------error--------------------------------------"
Printf.printfn "%A" (e.ToString())
Printf.printfn "---------------------------------------------------------------------"
#endif
#endif
reraise ()
......
......@@ -227,7 +227,6 @@ module ExtraTopLevelOperators =
[<CompiledName("PrintFormatLineToTextWriter")>]
let fprintfn (textWriter:TextWriter) format = Printf.fprintfn textWriter format
#if !FX_NO_SYSTEM_CONSOLE
[<CompiledName("PrintFormat")>]
let printf format = Printf.printf format
......@@ -239,7 +238,6 @@ module ExtraTopLevelOperators =
[<CompiledName("PrintFormatLineToError")>]
let eprintfn format = Printf.eprintfn format
#endif
[<CompiledName("FailWith")>]
let failwith s = raise (Failure s)
......
......@@ -12,7 +12,6 @@ module ExtraTopLevelOperators =
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Text
#if !FX_NO_SYSTEM_CONSOLE
/// <summary>Print to <c>stdout</c> using the given format.</summary>
/// <param name="format">The formatter.</param>
/// <returns>The formatted result.</returns>
......@@ -36,7 +35,6 @@ module ExtraTopLevelOperators =
/// <returns>The formatted result.</returns>
[<CompiledName("PrintFormatLineToError")>]
val eprintfn : format:Printf.TextWriterFormat<'T> -> 'T
#endif
/// <summary>Print to a string using the given format.</summary>
/// <param name="format">The formatter.</param>
......
......@@ -4335,7 +4335,6 @@ namespace Microsoft.FSharp.Core
[<CompiledName("Identity")>]
let id x = x
#if !FX_NO_SYSTEM_CONSOLE
// std* are TypeFunctions with the effect of reading the property on instantiation.
// So, direct uses of stdout should capture the current System.Console.Out at that point.
[<CompiledName("ConsoleIn")>]
......@@ -4346,10 +4345,8 @@ namespace Microsoft.FSharp.Core
[<CompiledName("ConsoleError")>]
let stderr<'T> = System.Console.Error
#endif
module Unchecked =
module Unchecked =
[<CompiledName("Unbox")>]
let inline unbox<'T> (v:obj) = unboxPrim<'T> v
......
......@@ -2360,10 +2360,9 @@ namespace Microsoft.FSharp.Core
[<CompiledName("NaNSingle")>]
val nanf: float32
#if !FX_NO_SYSTEM_CONSOLE
/// <summary>Reads the value of the property <c>System.Console.In</c>. </summary>
[<CompiledName("ConsoleIn")>]
val stdin<'T> : System.IO.TextReader
val stdin<'T> : System.IO.TextReader
/// <summary>Reads the value of the property <c>System.Console.Error</c>. </summary>
[<CompiledName("ConsoleError")>]
......@@ -2372,7 +2371,6 @@ namespace Microsoft.FSharp.Core
/// <summary>Reads the value of the property <c>System.Console.Out</c>.</summary>
[<CompiledName("ConsoleOut")>]
val stdout<'T> : System.IO.TextWriter
#endif
/// <summary>The standard overloaded range operator, e.g. <c>[n..m]</c> for lists, <c>seq {n..m}</c> for sequences</summary>
/// <param name="start">The start value of the range.</param>
......
......@@ -1645,20 +1645,6 @@ module Printf =
[<CompiledName("PrintFormatToStringThenFail")>]
let failwithf format = ksprintf failwith format
#if !FX_NO_SYSTEM_CONSOLE
#if EXTRAS_FOR_SILVERLIGHT_COMPILER
[<CompiledName("PrintFormat")>]
let printf format = fprintf (!outWriter) format
[<CompiledName("PrintFormatToError")>]
let eprintf format = fprintf (!errorWriter) format
[<CompiledName("PrintFormatLine")>]
let printfn format = fprintfn (!outWriter) format
[<CompiledName("PrintFormatLineToError")>]
let eprintfn format = fprintfn (!errorWriter) format
#else
[<CompiledName("PrintFormat")>]
let printf format = fprintf Console.Out format
......@@ -1670,5 +1656,3 @@ module Printf =
[<CompiledName("PrintFormatLineToError")>]
let eprintfn format = fprintfn Console.Error format
#endif
#endif
......@@ -183,7 +183,6 @@ module Printf =
[<CompiledName("PrintFormatLineToTextWriter")>]
val fprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T
#if !FX_NO_SYSTEM_CONSOLE
/// <summary>Formatted printing to stderr</summary>
/// <param name="format">The input formatter.</param>
/// <returns>The return type and arguments of the formatter.</returns>
......@@ -207,7 +206,7 @@ module Printf =
/// <returns>The return type and arguments of the formatter.</returns>
[<CompiledName("PrintFormatLine")>]
val printfn : format:TextWriterFormat<'T> -> 'T
#endif
/// <summary>Print to a string via an internal string buffer and return
/// the result as a string. Helper printers must return strings.</summary>
/// <param name="format">The input formatter.</param>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册