Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/tests/TestSplit.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ let filterArgs =
// Output format contract: each line must be "dotnet test <project> --no-build -c Release [filterargs]".
// Consumers: Build.ps1 parses via regex, build.sh parses via sed. Keep in sync if changing format.
if batchHasComponentAtoms || batch = residualBatch then
printfn $"dotnet test {componentTests} --no-build -c Release {filterArgs}"
printn $"dotnet test {componentTests} --no-build -c Release {filterArgs}"

for (proj, _, tag) in otherProjects |> List.filter (fun (_, b, tag) -> b = batch && matchesPlatform tag) do
printfn $"dotnet test {proj} --no-build -c Release"
printn $"dotnet test {proj} --no-build -c Release"
2 changes: 1 addition & 1 deletion src/Compiler/Checking/NameResolution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3127,7 +3127,7 @@ let rec ResolveLongIdentInTypePrim (ncenv: NameResolver) nenv lookupKind (resInf
// * is function type e.g.:
// ```fsharp
// member x.Prop with
// get () = fun a -> printfn $"{a}"
// get () = fun a -> printn $"{a}"
// ```
// which is called like this: obj.Prop 123
if p.IsIndexer then
Expand Down
6 changes: 3 additions & 3 deletions src/Compiler/CodeGen/IlxGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3183,9 +3183,9 @@ and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel =
match cenv.namedDebugPointsForInlinedCode.TryGetValue({ Range = m; Name = debugPointName }) with
| false, _ when String.IsNullOrEmpty(debugPointName) -> CG.EmitDebugPoint cgbuf m
| false, _ ->
// printfn $"---- Unfound debug point {debugPointName} at {m}"
// printn $"---- Unfound debug point {debugPointName} at {m}"
// for KeyValue(k,v) in cenv.namedDebugPointsForInlinedCode do
// printfn $"{k.Range} , {k.Name} -> {v}"
// printn $"{k.Range} , {k.Name} -> {v}"
let others =
[
for k in cenv.namedDebugPointsForInlinedCode.Keys do
Expand All @@ -3200,7 +3200,7 @@ and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel =

CG.EmitDebugPoint cgbuf m
| true, dp ->
// printfn $"---- Found debug point {debugPointName} at {m} --> {dp}"
// printn $"---- Found debug point {debugPointName} at {m} --> {dp}"
CG.EmitDebugPoint cgbuf dp

GenExpr cenv cgbuf eenv codeExpr sequel
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Service/SynExpr.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ module SynExpr =
// let x = 3
// (
// let x = 4
// printfn $"{x}"
// printn $"{x}"
// )
// x
| SynExpr.Sequential(expr1 = SynExpr.Paren(expr = Is inner); expr2 = expr2), _ when innerBindingsWouldShadowOuter inner expr2 ->
Expand Down
4 changes: 2 additions & 2 deletions src/FSharp.Core/array2.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ module Array2D =
/// <code lang="fsharp">
/// let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ]
///
/// inputs |> Array2D.iter (fun v -> printfn $"value = {v}")
/// inputs |> Array2D.iter (fun v -> printn $"value = {v}")
/// </code>
/// Evaluates to <c>unit</c> and prints
/// <code>
Expand All @@ -277,7 +277,7 @@ module Array2D =
/// <code lang="fsharp">
/// let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ]
///
/// inputs |> Array2D.iteri (fun i j v -> printfn $"value at ({i},{j}) = {v}")
/// inputs |> Array2D.iteri (fun i j v -> printn $"value at ({i},{j}) = {v}")
/// </code>
/// Evaluates to <c>unit</c> and prints
/// <code>
Expand Down
4 changes: 2 additions & 2 deletions src/FSharp.Core/array3.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module Array3D =
/// <code lang="fsharp">
/// let inputs = Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k)
///
/// inputs |> Array3D.iter (fun v -> printfn $"value = {v}")
/// inputs |> Array3D.iter (fun v -> printn $"value = {v}")
/// </code>
/// Evaluates to <c>unit</c> and prints
/// <code>
Expand Down Expand Up @@ -120,7 +120,7 @@ module Array3D =
/// <code lang="fsharp">
/// let inputs = Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k)
///
/// inputs |> Array3D.iteri (fun i j k v -> printfn $"value at ({i},{j},{k}) = {v}")
/// inputs |> Array3D.iteri (fun i j k v -> printn $"value at ({i},{j},{k}) = {v}")
/// </code>
/// Evaluates to <c>unit</c> and prints
/// <code>
Expand Down
60 changes: 30 additions & 30 deletions src/FSharp.Core/async.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ namespace Microsoft.FSharp.Control
/// |> Async.Catch
/// |> Async.RunSynchronously
/// |> function
/// | Choice1Of2 result -> printfn $"Result: {result}"
/// | Choice2Of2 e -> printfn $"Exception: {e}"
/// | Choice1Of2 result -> printn $"Result: {result}"
/// | Choice2Of2 e -> printn $"Exception: {e}"
/// </code>
/// Prints the returned value of someRiskyBusiness() or the exception if there is one.
/// </example>
Expand All @@ -239,9 +239,9 @@ namespace Microsoft.FSharp.Control
/// Async.TryCancelled(
/// async {
/// do! Async.Sleep(i * 1000)
/// printfn $"{i}"
/// printn $"{i}"
/// },
/// fun oce -> printfn $"Computation Cancelled: {i}")
/// fun oce -> printn $"Computation Cancelled: {i}")
/// |> Async.Start
///
/// Thread.Sleep(6000)
Expand Down Expand Up @@ -276,9 +276,9 @@ namespace Microsoft.FSharp.Control
/// let primes = [ 2; 3; 5; 7; 11 ]
/// for i in primes do
/// async {
/// use! holder = Async.OnCancel(fun () -> printfn $"Computation Cancelled: {i}")
/// use! holder = Async.OnCancel(fun () -> printn $"Computation Cancelled: {i}")
/// do! Async.Sleep(i * 1000)
/// printfn $"{i}"
/// printn $"{i}"
/// }
/// |> Async.Start
///
Expand Down Expand Up @@ -320,7 +320,7 @@ namespace Microsoft.FSharp.Control
/// [ for i in primes do
/// async {
/// do! Async.Sleep(i * 1000)
/// printfn $"{i}"
/// printn $"{i}"
/// }
/// ]
///
Expand All @@ -330,9 +330,9 @@ namespace Microsoft.FSharp.Control
///
/// Thread.Sleep(6000)
/// Async.CancelDefaultToken()
/// printfn $"Tasks Finished: %A{t.Result}"
/// printn $"Tasks Finished: %A{t.Result}"
/// with
/// | :? System.AggregateException as ae -> printfn $"Tasks Not Finished: {ae.Message}"
/// | :? System.AggregateException as ae -> printn $"Tasks Not Finished: {ae.Message}"
/// </code>
/// This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation and
/// then print "Tasks Not Finished: One or more errors occurred. (A task was canceled.)".
Expand All @@ -353,7 +353,7 @@ namespace Microsoft.FSharp.Control
/// for i in primes do
/// async {
/// do! Async.Sleep(i * 1000)
/// printfn $"{i}"
/// printn $"{i}"
/// }
/// |> Async.Start
///
Expand Down Expand Up @@ -417,7 +417,7 @@ namespace Microsoft.FSharp.Control
/// do! Async.Sleep 500 // Or any other async activity
/// let! v1 = completor1
/// let! v2 = completor2
/// printfn $"Result: {v1 + v2}"
/// printn $"Result: {v1 + v2}"
/// } |> Async.RunSynchronouslyImmediate
/// </code>
/// Will throw a <c>System.TimeoutException</c> if called with a timeout under 2000, otherwise will print "Result: 3".
Expand Down Expand Up @@ -451,7 +451,7 @@ namespace Microsoft.FSharp.Control
/// do! Async.Sleep(System.Random().Next(1000, 2000))
///
/// if i % 2 > 0 then
/// printfn $"{i}"
/// printn $"{i}"
/// return true
/// else
/// return false
Expand All @@ -461,7 +461,7 @@ namespace Microsoft.FSharp.Control
/// |> Async.StartAsTask
///
/// t.Wait()
/// printfn $"%A{t.Result}"
/// printn $"%A{t.Result}"
/// </code>
/// This will print "3", "5", "7", "11" (in any order) in 1-2 seconds and then [| false; true; true; true; false; true |].
/// </example>
Expand Down Expand Up @@ -496,7 +496,7 @@ namespace Microsoft.FSharp.Control
///
/// return
/// if i % 2 > 0 then
/// printfn $"{i}"
/// printn $"{i}"
/// true
/// else
/// false
Expand All @@ -507,7 +507,7 @@ namespace Microsoft.FSharp.Control
/// |> Async.StartAsTask
///
/// t.Wait()
/// printfn $"%A{t.Result}"
/// printn $"%A{t.Result}"
/// </code>
/// This will print "3", "5" (in any order) in 1-2 seconds, and then "7", "11" (in any order) in 1-2 more seconds and then
/// [| false; true; true; true; false; true |].
Expand Down Expand Up @@ -540,7 +540,7 @@ namespace Microsoft.FSharp.Control
/// do! Async.Sleep(System.Random().Next(1000, 2000))
///
/// if i % 2 > 0 then
/// printfn $"{i}"
/// printn $"{i}"
/// return true
/// else
/// return false
Expand All @@ -552,7 +552,7 @@ namespace Microsoft.FSharp.Control
/// |> Async.StartAsTask
///
/// t.Wait()
/// printfn $"%A{t.Result}"
/// printn $"%A{t.Result}"
/// </code>
/// This will print "3", "5", "7", "11" with ~1-2 seconds between them except for pauses where even numbers would be and then
/// prints [| false; true; true; true; false; true |].
Expand Down Expand Up @@ -596,7 +596,7 @@ namespace Microsoft.FSharp.Control
/// |> Async.Choice
/// |> Async.RunSynchronously
/// |> function
/// | Some (i) -> printfn $"{i}"
/// | Some (i) -> printn $"{i}"
/// | None -> printfn "No Result"
/// </code>
/// Prints one randomly selected odd number in 1-2 seconds. If the list is changed to all even numbers, it will
Expand All @@ -623,7 +623,7 @@ namespace Microsoft.FSharp.Control
/// |> Async.Choice
/// |> Async.RunSynchronously
/// |> function
/// | Some (i) -> printfn $"{i}"
/// | Some (i) -> printn $"{i}"
/// | None -> printfn "No Result"
/// </code>
/// Will sometimes print one randomly selected odd number, sometimes throw System.Exception("Even numbers not supported: 2").
Expand Down Expand Up @@ -715,9 +715,9 @@ namespace Microsoft.FSharp.Control
///
/// Async.StartWithContinuations(
/// computation,
/// (fun result -> printfn $"Result: {result}"),
/// (fun e -> printfn $"Exception: {e}"),
/// (fun oce -> printfn $"Cancelled: {oce}")
/// (fun result -> printn $"Result: {result}"),
/// (fun e -> printn $"Exception: {e}"),
/// (fun oce -> printn $"Cancelled: {oce}")
/// )
/// </code>
/// This anonymous function will call someRiskyBusiness() and properly use the provided continuations
Expand Down Expand Up @@ -804,7 +804,7 @@ namespace Microsoft.FSharp.Control
/// | :? System.InvalidOperationException ->
/// printfn "unreachable" // will not match: exception is wrapped in AggregateException
/// | :? System.AggregateException as e ->
/// printfn $"Caught: {e.InnerException.Message}"
/// printn $"Caught: {e.InnerException.Message}"
/// } |> Async.RunSynchronously
/// </code>
/// Prints <c>Caught: test</c>. The <c>InvalidOperationException</c> branch is not reached because
Expand Down Expand Up @@ -837,7 +837,7 @@ namespace Microsoft.FSharp.Control
/// | :? System.InvalidOperationException ->
/// printfn "unreachable" // will not match: exception is wrapped in AggregateException
/// | :? System.AggregateException as e ->
/// printfn $"Caught: {e.InnerException.Message}"
/// printn $"Caught: {e.InnerException.Message}"
/// } |> Async.RunSynchronously
/// </code>
/// Prints <c>Caught: test</c>. The <c>InvalidOperationException</c> branch is not reached because
Expand Down Expand Up @@ -878,7 +878,7 @@ namespace Microsoft.FSharp.Control
/// ()
/// with
/// | :? System.InvalidOperationException as e ->
/// printfn $"Caught: {e.Message}"
/// printn $"Caught: {e.Message}"
/// | :? System.AggregateException ->
/// printfn "unreachable" // will not match: single exception is unwrapped
/// } |> Async.RunSynchronously
Expand Down Expand Up @@ -915,7 +915,7 @@ namespace Microsoft.FSharp.Control
/// do! Async.Await t
/// with
/// | :? System.InvalidOperationException as e ->
/// printfn $"Caught: {e.Message}"
/// printn $"Caught: {e.Message}"
/// | :? System.AggregateException ->
/// printfn "unreachable" // will not match: single exception is unwrapped
/// } |> Async.RunSynchronously
Expand Down Expand Up @@ -955,7 +955,7 @@ namespace Microsoft.FSharp.Control
/// ()
/// with
/// | :? System.InvalidOperationException as e ->
/// printfn $"Caught: {e.Message}"
/// printn $"Caught: {e.Message}"
/// | :? System.AggregateException ->
/// printfn "unreachable" // will not match: single exception is unwrapped
/// } |> Async.RunSynchronously
Expand Down Expand Up @@ -991,7 +991,7 @@ namespace Microsoft.FSharp.Control
/// do! Async.Await vt
/// with
/// | :? System.InvalidOperationException as e ->
/// printfn $"Caught: {e.Message}"
/// printn $"Caught: {e.Message}"
/// | :? System.AggregateException ->
/// printfn "unreachable" // will not match: single exception is unwrapped
/// } |> Async.RunSynchronously
Expand Down Expand Up @@ -1410,7 +1410,7 @@ namespace Microsoft.FSharp.Control
/// let myTask = MyTask(System.Threading.Tasks.Task.FromResult 42)
/// async {
/// let! result = Async.Await myTask
/// printfn $"Result: {result}"
/// printn $"Result: {result}"
/// } |> Async.RunSynchronously
/// </code>
/// Prints <c>Result: 42</c>.
Expand Down Expand Up @@ -1460,7 +1460,7 @@ namespace Microsoft.FSharp.Control
///
/// async {
/// let! html = fetchConfigured "https://example.com"
/// printfn $"Downloaded {html.Length} chars"
/// printn $"Downloaded {html.Length} chars"
/// } |> Async.RunSynchronouslyImmediate
/// </code>
/// </example>
Expand Down
18 changes: 9 additions & 9 deletions src/FSharp.Core/eventmodule.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module Event =
///
/// let result = Event.merge oneSecondTimer fiveSecondsTimer
///
/// result.Subscribe(fun output -> printfn $"Output - {output.SignalTime} ")
/// result.Subscribe(fun output -> printn $"Output - {output.SignalTime} ")
/// |> ignore
///
/// Console.ReadLine() |> ignore
Expand Down Expand Up @@ -71,7 +71,7 @@ module Event =
///
/// let evenSecondsEvent = Event.map transformSeconds timer
///
/// evenSecondsEvent.Subscribe(fun x -> printf $"{x} ")
/// evenSecondsEvent.Subscribe(fun x -> print $"{x} ")
/// |> ignore
///
/// Console.ReadLine() |> ignore
Expand Down Expand Up @@ -107,7 +107,7 @@ module Event =
///
/// let evenSecondsEvent = Event.filter getEvenSeconds timer
///
/// evenSecondsEvent.Subscribe(fun x -> printfn $"{x} ")
/// evenSecondsEvent.Subscribe(fun x -> printn $"{x} ")
/// |> ignore
///
/// Console.ReadLine() |> ignore
Expand Down Expand Up @@ -148,10 +148,10 @@ module Event =
///
/// let leftPartition, rightPartition = Event.partition getEvenSeconds timer
///
/// leftPartition.Subscribe(fun x -> printfn $"Left partition: {x.SignalTime}")
/// leftPartition.Subscribe(fun x -> printn $"Left partition: {x.SignalTime}")
/// |> ignore
///
/// rightPartition.Subscribe(fun x -> printfn $"Right partition: {x.SignalTime}")
/// rightPartition.Subscribe(fun x -> printn $"Right partition: {x.SignalTime}")
/// |> ignore
///
/// Console.ReadLine() |> ignore
Expand Down Expand Up @@ -195,7 +195,7 @@ module Event =
/// let evenSplit, printOddNumbers = Event.split bySeconds timer
///
/// let printOutput event functionName =
/// Event.add (fun output -> printfn $"{functionName} - Split output: {output}. /// Type: {output.GetType()}") event
/// Event.add (fun output -> printn $"{functionName} - Split output: {output}. /// Type: {output.GetType()}") event
///
/// printOutput evenSplit (nameof evenSplit) |> ignore
///
Expand Down Expand Up @@ -240,7 +240,7 @@ module Event =
///
/// let evenSecondsEvent = Event.choose getEvenSeconds timer
///
/// evenSecondsEvent.Subscribe(fun x -> printfn $"{x} ")
/// evenSecondsEvent.Subscribe(fun x -> printn $"{x} ")
/// |> ignore
///
/// Console.ReadLine() |> ignore
Expand Down Expand Up @@ -308,7 +308,7 @@ module Event =
///
/// let timer = createTimer 1000
///
/// Event.add (fun (event: Timers.ElapsedEventArgs) -> printfn $"{event.SignalTime} ") timer
/// Event.add (fun (event: Timers.ElapsedEventArgs) -> printn $"{event.SignalTime} ") timer
///
/// Console.ReadLine() |> ignore
/// </code>
Expand Down Expand Up @@ -345,7 +345,7 @@ module Event =
///
/// let extractPair (pair: Timers.ElapsedEventArgs * Timers.ElapsedEventArgs) =
/// let leftPair, rightPair = pair
/// printfn $"(Left): {leftPair.SignalTime} (Right): {rightPair.SignalTime}"
/// printn $"(Left): {leftPair.SignalTime} (Right): {rightPair.SignalTime}"
///
/// pairWise.Subscribe(extractPair) |> ignore
///
Expand Down
Loading
Loading