You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Printed quotations show a struct tuple as NewTuple #20800
Expr.ToString () and %A print the construction of a struct tuple exactly like the construction of a reference tuple, so a printed quotation does not show which tuple kind it builds.
The struct tuple prints with the name of its active pattern and constructor (#8193): NewStructTuple (Value (1), Value ("a")).
Actual behavior
Both lines print NewTuple (Value (1), Value ("a")). Only Expr.Type tells them apart. Patterns.NewStructTuple matches the first quotation only, so the printer is the one place that hides the difference.
This matters for code that rewrites quotations: Expr.NewTuple always builds System.Tuple, so a rewrite that rebuilds a struct tuple with it changes the type of the tree, and a test that compares printed quotations cannot catch that.
Known workarounds
Compare Expr.Type (IsValueType) instead of the printed text.
Related information
FSharp.Core 10.1.0.0, .NET SDK 10.0.402 (dotnet fsi), Windows 11
Activity
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
docs: record normalized members and the facts of 2026-10-17 in ADR 0001
Distinguish struct tuples in quotation output (#20814)