From 1c1389aaccbde12dbb0609c01e713276ab9d706a Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 14 Feb 2026 15:30:33 +0200 Subject: [PATCH 1/4] Add generic print and printn functions to FSharp.Core Add inline `print: 'T -> unit` and `printn: 'T -> unit` to ExtraTopLevelOperators. These use the existing `string` function for conversion (InvariantCulture for IFormattable, .ToString() fallback) and write to Console.Out. RFC FS-1125 --- docs/release-notes/.FSharp.Core/10.0.300.md | 1 + src/FSharp.Core/fslib-extra-pervasives.fs | 8 ++ src/FSharp.Core/fslib-extra-pervasives.fsi | 27 +++++++ ...p.Core.SurfaceArea.netstandard20.debug.bsl | 2 + ...Core.SurfaceArea.netstandard20.release.bsl | 2 + ...p.Core.SurfaceArea.netstandard21.debug.bsl | 2 + ...Core.SurfaceArea.netstandard21.release.bsl | 2 + .../FSharp.Core.UnitTests.fsproj | 1 + .../Microsoft.FSharp.Core/PrintTests.fs | 76 +++++++++++++++++++ 9 files changed, 121 insertions(+) create mode 100644 tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/PrintTests.fs diff --git a/docs/release-notes/.FSharp.Core/10.0.300.md b/docs/release-notes/.FSharp.Core/10.0.300.md index 6904303cc37..c1b56bf237d 100644 --- a/docs/release-notes/.FSharp.Core/10.0.300.md +++ b/docs/release-notes/.FSharp.Core/10.0.300.md @@ -14,6 +14,7 @@ ### Added * Add `List.partitionWith`, `Array.partitionWith`, `Set.partitionWith`, and `Array.Parallel.partitionWith` functions that partition a collection using a function that returns `Choice<'T1, 'T2>`. ([Language Suggestion #1119](https://github.com/fsharp/fslang-suggestions/issues/1119)) +* Added generic `print` and `printn` functions (`'T -> unit`) to `ExtraTopLevelOperators` for simple value printing to stdout. ([RFC FS-1125](https://github.com/fsharp/fslang-design/blob/main/RFCs/FS-1125-print-printn-functions.md), [PR #19265](https://github.com/dotnet/fsharp/pull/19265)) ### Changed diff --git a/src/FSharp.Core/fslib-extra-pervasives.fs b/src/FSharp.Core/fslib-extra-pervasives.fs index 924f057b7e1..eb1fc74029f 100644 --- a/src/FSharp.Core/fslib-extra-pervasives.fs +++ b/src/FSharp.Core/fslib-extra-pervasives.fs @@ -277,6 +277,14 @@ module ExtraTopLevelOperators = let eprintfn format = Printf.eprintfn format + [] + let inline print (value: 'T) = + Console.Out.Write(string value) + + [] + let inline printn (value: 'T) = + Console.Out.WriteLine(string value) + [] let async = AsyncBuilder() diff --git a/src/FSharp.Core/fslib-extra-pervasives.fsi b/src/FSharp.Core/fslib-extra-pervasives.fsi index dff6b2e68d1..878b62547c5 100644 --- a/src/FSharp.Core/fslib-extra-pervasives.fsi +++ b/src/FSharp.Core/fslib-extra-pervasives.fsi @@ -56,6 +56,33 @@ module ExtraTopLevelOperators = [] val eprintfn: format: Printf.TextWriterFormat<'T> -> 'T + /// Converts the value to a string using the string operator and writes it to the standard output. + /// + /// The value to print. + /// + /// + /// + /// print "Hello, " + /// print "World!" + /// // output: Hello, World! + /// + /// + [] + val inline print: value: 'T -> unit + + /// Converts the value to a string using the string operator and writes it to the standard output, followed by a newline. + /// + /// The value to print. + /// + /// + /// + /// printn "Hello, World!" + /// // output: Hello, World! + /// + /// + [] + val inline printn: value: 'T -> unit + /// Print to a string using the given format. /// /// The formatter. diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl index 5b6cc0bce4e..419265a0d97 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl @@ -1077,6 +1077,8 @@ Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToStringThenFail[T,TR Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToString[T](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,System.String]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormat[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValue[T](T) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValueLine[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceExpression[T](Microsoft.FSharp.Quotations.FSharpExpr`1[T]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceUntypedExpression[T](Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Core.ExtraTopLevelOperators: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl index 217d4b7c837..6985634e36b 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl @@ -1077,6 +1077,8 @@ Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToStringThenFail[T,TR Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToString[T](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,System.String]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormat[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValue[T](T) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValueLine[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceExpression[T](Microsoft.FSharp.Quotations.FSharpExpr`1[T]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceUntypedExpression[T](Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Core.ExtraTopLevelOperators: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl index 43defdb622e..e54941e680a 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl @@ -1080,6 +1080,8 @@ Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToStringThenFail[T,TR Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToString[T](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,System.String]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormat[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValue[T](T) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValueLine[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceExpression[T](Microsoft.FSharp.Quotations.FSharpExpr`1[T]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceUntypedExpression[T](Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Core.ExtraTopLevelOperators: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl index ed913ea04d3..d2ba4b44e02 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl @@ -1080,6 +1080,8 @@ Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToStringThenFail[T,TR Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToString[T](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,System.String]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormat[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValue[T](T) +Microsoft.FSharp.Core.ExtraTopLevelOperators: Void PrintValueLine[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceExpression[T](Microsoft.FSharp.Quotations.FSharpExpr`1[T]) Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceUntypedExpression[T](Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Core.ExtraTopLevelOperators: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj index d4ff59d3cbd..829ab588f7a 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj @@ -72,6 +72,7 @@ + diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/PrintTests.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/PrintTests.fs new file mode 100644 index 00000000000..4c5526a9524 --- /dev/null +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/PrintTests.fs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +// Various tests for: +// Microsoft.FSharp.Core.ExtraTopLevelOperators.print +// Microsoft.FSharp.Core.ExtraTopLevelOperators.printn + +namespace FSharp.Core.UnitTests + +open System +open System.IO +open Xunit + +[] +type PrintTests() = + + let captureConsoleOut (f: unit -> unit) = + let oldOut = Console.Out + use sw = new StringWriter() + Console.SetOut(sw) + try + f () + sw.ToString() + finally + Console.SetOut(oldOut) + + [] + member _.``print writes string value``() = + let result = captureConsoleOut (fun () -> print "hello") + Assert.Equal("hello", result) + + [] + member _.``print writes integer value``() = + let result = captureConsoleOut (fun () -> print 42) + Assert.Equal("42", result) + + [] + member _.``print writes float with InvariantCulture``() = + let result = captureConsoleOut (fun () -> print 3.14) + Assert.Equal("3.14", result) + + [] + member _.``print writes bool value``() = + let result = captureConsoleOut (fun () -> print true) + Assert.Equal("True", result) + + [] + member _.``print writes Some value``() = + let result = captureConsoleOut (fun () -> print (Some 42)) + Assert.Equal("Some(42)", result) + + [] + member _.``print writes None value``() = + let result = captureConsoleOut (fun () -> print None) + Assert.Equal("", result) + + [] + member _.``print writes list value``() = + let result = captureConsoleOut (fun () -> print [1; 2; 3]) + Assert.Equal("[1; 2; 3]", result) + + [] + member _.``printn writes value followed by newline``() = + let result = captureConsoleOut (fun () -> printn "hello") + Assert.Equal("hello" + Environment.NewLine, result) + + [] + member _.``multiple prints concatenate``() = + let result = captureConsoleOut (fun () -> + print "Hello, " + print "World!") + Assert.Equal("Hello, World!", result) + + [] + member _.``printn writes integer with newline``() = + let result = captureConsoleOut (fun () -> printn 42) + Assert.Equal("42" + Environment.NewLine, result) From c3f34de3159acf7033e11ef2d9762479124a9daf Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 14 Feb 2026 16:59:40 +0200 Subject: [PATCH 2/4] Add IL baseline tests for print and printn Verify that inline specialization produces direct calls to Int32.ToString, Double.ToString with InvariantCulture, and Console.Out.Write/WriteLine for the respective types. --- .../EmittedIL/PrintFunction.fs | 70 +++++++++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + 2 files changed, 71 insertions(+) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs new file mode 100644 index 00000000000..5d2ebeed62a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace EmittedIL + +open Xunit +open FSharp.Test.Compiler + +module PrintFunction = + + [] + let ``print with int specializes to Int32 ToString with InvariantCulture``() = + FSharp """ +module PrintInt + +let printInt () = print 42 + """ + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()""" + """call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture()""" + """call instance string [netstandard]System.Int32::ToString(string,""" + """callvirt instance void [netstandard]System.IO.TextWriter::Write(string)"""] + + [] + let ``printn with int specializes to Int32 ToString with InvariantCulture``() = + FSharp """ +module PrintnInt + +let printnInt () = printn 42 + """ + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()""" + """call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture()""" + """call instance string [netstandard]System.Int32::ToString(string,""" + """callvirt instance void [netstandard]System.IO.TextWriter::WriteLine(string)"""] + + [] + let ``print with string writes to Console Out``() = + FSharp """ +module PrintString + +let printStr () = print "hello" + """ + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()""" + """callvirt instance void [netstandard]System.IO.TextWriter::Write(string)"""] + + [] + let ``printn with float specializes to Double ToString with InvariantCulture``() = + FSharp """ +module PrintnFloat + +let printnFloat () = printn 3.14 + """ + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()""" + """call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture()""" + """call instance string [netstandard]System.Double::ToString(string,""" + """callvirt instance void [netstandard]System.IO.TextWriter::WriteLine(string)"""] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 3fc031a525f..97f41602ebc 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -235,6 +235,7 @@ + From badbee163052245c0a845d6ffd6ce5c61daa750d Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 15 Feb 2026 09:51:45 +0200 Subject: [PATCH 3/4] Add static optimizations for string, char, and bool For culture-independent types (string, char, bool), bypass the `string` operator and call the appropriate TextWriter.Write/WriteLine overload directly. Numeric types (int, float, etc.) must still go through `string` to ensure InvariantCulture formatting, since TextWriter.Write(int/float) uses the writer's FormatProvider which is CurrentCulture for Console.Out. Add IL tests verifying char and bool use their direct overloads. --- .fantomasignore | 1 + src/FSharp.Core/fslib-extra-pervasives.fs | 9 ++++++ .../EmittedIL/PrintFunction.fs | 30 ++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.fantomasignore b/.fantomasignore index 1b373a01b2e..fff0a1b9cbc 100644 --- a/.fantomasignore +++ b/.fantomasignore @@ -75,6 +75,7 @@ src/Compiler/SyntaxTree/LexFilter.fs src/FSharp.Core/array2.fs src/FSharp.Core/array3.fs +src/FSharp.Core/fslib-extra-pervasives.fs src/FSharp.Core/Linq.fs src/FSharp.Core/local.fs src/FSharp.Core/nativeptr.fs diff --git a/src/FSharp.Core/fslib-extra-pervasives.fs b/src/FSharp.Core/fslib-extra-pervasives.fs index eb1fc74029f..4dd4250843d 100644 --- a/src/FSharp.Core/fslib-extra-pervasives.fs +++ b/src/FSharp.Core/fslib-extra-pervasives.fs @@ -280,10 +280,19 @@ module ExtraTopLevelOperators = [] let inline print (value: 'T) = Console.Out.Write(string value) + // Culture-independent types can bypass 'string' and use TextWriter overloads directly. + // Numeric types must go through 'string' to ensure InvariantCulture formatting, + // since TextWriter.Write(int/float/...) uses the writer's FormatProvider (CurrentCulture). + when 'T : string = Console.Out.Write((# "" value : string #)) + when 'T : char = Console.Out.Write((# "" value : char #)) + when 'T : bool = Console.Out.Write((# "" value : bool #)) [] let inline printn (value: 'T) = Console.Out.WriteLine(string value) + when 'T : string = Console.Out.WriteLine((# "" value : string #)) + when 'T : char = Console.Out.WriteLine((# "" value : char #)) + when 'T : bool = Console.Out.WriteLine((# "" value : bool #)) [] let async = AsyncBuilder() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs index 5d2ebeed62a..16db7328cac 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/PrintFunction.fs @@ -40,7 +40,7 @@ let printnInt () = printn 42 """callvirt instance void [netstandard]System.IO.TextWriter::WriteLine(string)"""] [] - let ``print with string writes to Console Out``() = + let ``print with string calls Write directly``() = FSharp """ module PrintString @@ -53,6 +53,34 @@ let printStr () = print "hello" """call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()""" """callvirt instance void [netstandard]System.IO.TextWriter::Write(string)"""] + [] + let ``print with char calls Write char overload``() = + FSharp """ +module PrintChar + +let printChar () = print 'A' + """ + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()""" + """callvirt instance void [netstandard]System.IO.TextWriter::Write(char)"""] + + [] + let ``print with bool calls Write bool overload``() = + FSharp """ +module PrintBool + +let printBool () = print true + """ + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()""" + """callvirt instance void [netstandard]System.IO.TextWriter::Write(bool)"""] + [] let ``printn with float specializes to Double ToString with InvariantCulture``() = FSharp """ From 0f9b3ba7ef925ad22e5cd73a087d5a9a90e03d32 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 17 Mar 2026 17:51:22 +0200 Subject: [PATCH 4/4] Move print/printn release notes to FSharp.Core 11.0.100 --- docs/release-notes/.FSharp.Core/10.0.300.md | 1 - docs/release-notes/.FSharp.Core/11.0.100.md | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Core/10.0.300.md b/docs/release-notes/.FSharp.Core/10.0.300.md index c1b56bf237d..6904303cc37 100644 --- a/docs/release-notes/.FSharp.Core/10.0.300.md +++ b/docs/release-notes/.FSharp.Core/10.0.300.md @@ -14,7 +14,6 @@ ### Added * Add `List.partitionWith`, `Array.partitionWith`, `Set.partitionWith`, and `Array.Parallel.partitionWith` functions that partition a collection using a function that returns `Choice<'T1, 'T2>`. ([Language Suggestion #1119](https://github.com/fsharp/fslang-suggestions/issues/1119)) -* Added generic `print` and `printn` functions (`'T -> unit`) to `ExtraTopLevelOperators` for simple value printing to stdout. ([RFC FS-1125](https://github.com/fsharp/fslang-design/blob/main/RFCs/FS-1125-print-printn-functions.md), [PR #19265](https://github.com/dotnet/fsharp/pull/19265)) ### Changed diff --git a/docs/release-notes/.FSharp.Core/11.0.100.md b/docs/release-notes/.FSharp.Core/11.0.100.md index 3349ac75260..62f5d434866 100644 --- a/docs/release-notes/.FSharp.Core/11.0.100.md +++ b/docs/release-notes/.FSharp.Core/11.0.100.md @@ -4,3 +4,6 @@ * Fix `Array.exists2` documentation examples to use equal-length arrays; the previous examples would throw `ArgumentException` at runtime instead of returning the documented `false`/`true` values. ([PR #19672](https://github.com/dotnet/fsharp/pull/19672)) * Move `Async.StartChild` to the "Starting Async Computations" docs category alongside `Async.StartChildAsTask`. ([Issue #19667](https://github.com/dotnet/fsharp/issues/19667)) * Add `InlineIfLambda` to `Array.init` ([PR #19869](https://github.com/dotnet/fsharp/pull/19869)) +### Added + +* Added generic `print` and `printn` functions (`'T -> unit`) to `ExtraTopLevelOperators` for simple value printing to stdout. ([RFC FS-1125](https://github.com/fsharp/fslang-design/blob/main/RFCs/FS-1125-print-printn-functions.md), [PR #19265](https://github.com/dotnet/fsharp/pull/19265))