Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cbb2a62
Remove LetOrUseKeyword from SynExprLetOrUseTrivia
nojaf Nov 14, 2025
3a32e6e
Add changelog entry
nojaf Nov 14, 2025
34b6640
Look at that
nojaf Nov 14, 2025
44c58e9
Update SurfaceArea
nojaf Nov 14, 2025
3efffac
My money is on a flaky unrelated test
nojaf Nov 14, 2025
83b649a
Capture in keyword at SynBinding level
nojaf Nov 14, 2025
87e769a
Refactor booleans in SynExpr.LetOrUse
nojaf Nov 21, 2025
b9328be
Add In keyword to SynModuleDeclLetTrivia
nojaf Nov 22, 2025
e9d598d
Add IN keyword to SynMemberDefnLetBindingsTrivia
nojaf Nov 22, 2025
b004c1e
Include IN keyword in the range of SynModuleDecl.Let
nojaf Nov 22, 2025
52c5689
Add IN keyword to SynLetOrUseTrivia
nojaf Nov 22, 2025
e3145f6
Remove mIn from SynBindingTrivia
nojaf Nov 22, 2025
53d7c4d
Update release notes
nojaf Nov 22, 2025
ebb8c20
Move SynLeadingKeyword back
nojaf Nov 22, 2025
d48279f
Remove when clause
nojaf Nov 26, 2025
e43b87f
Fix wrong IN keyword assignment
nojaf Nov 28, 2025
1226ab4
Use LetOrUse active pattern to compensate for syntax changes.
nojaf Nov 28, 2025
9c2d082
Trigger CI again
nojaf Nov 28, 2025
8c485dd
Merge branch 'main' into extend-SynLeadingKeyword
nojaf Nov 28, 2025
1c72094
Move release notes
nojaf Nov 28, 2025
30ff4ca
Keep doc comment in signature
nojaf Nov 28, 2025
502091e
I still don't buy it that CI can't build my code 🐼
nojaf Nov 29, 2025
92d2a3f
Correct leading keyword
nojaf Dec 2, 2025
7de8799
Update range to include in keyword
nojaf Dec 2, 2025
88b0e9a
Merge branch 'main' into extend-SynLeadingKeyword
nojaf Dec 2, 2025
9c19d0f
Merge branch 'main' into extend-SynLeadingKeyword
T-Gro Dec 2, 2025
b3d90dc
Trigger CI cuz fslex.runtimeconfig.json' because it is being used by …
nojaf Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion docs/release-notes/.FSharp.Compiler.Service/10.0.200.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Fixed

* Type relations cache: optimize key generation ([Issue #19116](https://github.com/dotnet/fsharp/issues/18767)) ([PR #19120](https://github.com/dotnet/fsharp/pull/19120))
* Type relations cache: optimize key generation ([Issue #19116](https://github.com/dotnet/fsharp/issues/18767)) ([PR #19120](https://github.com/dotnet/fsharp/pull/19120))

### Breaking Changes

* `SynExpr.LetOrUse` holds `SynLetOrUse`. ([PR #19090](https://github.com/dotnet/fsharp/pull/19090))
* `SynExprLetOrUseTrivia` is now `SynLetOrUseTrivia`. ([PR #19090](https://github.com/dotnet/fsharp/pull/19090))
* `SynMemberDefn.LetBindings` has trivia. ([PR #19090](https://github.com/dotnet/fsharp/pull/19090))
* `SynModuleDecl.Let` has trivia. ([PR #19090](https://github.com/dotnet/fsharp/pull/19090))
3 changes: 0 additions & 3 deletions docs/release-notes/.FSharp.Compiler.Service/11.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@

* Parallel compilation features: ref resolution, graph based checking, ILXGen and optimization enabled by default ([PR #18998](https://github.com/dotnet/fsharp/pull/18998))
* Make graph based type checking and parallel optimizations deterministic ([PR #19028](https://github.com/dotnet/fsharp/pull/19028))


### Breaking Changes
14 changes: 7 additions & 7 deletions src/Compiler/Checking/CheckDeclarations.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ module MutRecBindingChecking =
let innerState = (incrCtorInfoOpt, envForTycon, tpenv, recBindIdx, uncheckedBindsRev)
[Phase2AInherit (ty, arg, baseValOpt, m); Phase2AIncrClassCtorJustAfterSuperInit], innerState

| Some (SynMemberDefn.LetBindings (letBinds, isStatic, isRec, m)), _ ->
| Some (SynMemberDefn.LetBindings (bindings = letBinds; isStatic = isStatic; isRecursive = isRec; range = m)), _ ->
match tcref.TypeOrMeasureKind, isStatic with
| TyparKind.Measure, false -> errorR(Error(FSComp.SR.tcMeasureDeclarationsRequireStaticMembers(), m))
| _ -> ()
Expand Down Expand Up @@ -4412,7 +4412,7 @@ module TcDeclarations =
let attribs = mkAttributeList attribs mWholeAutoProp
let binding = mkSynBinding (xmlDoc, headPat) (None, false, isMutable, mLetPortion, DebugPointAtBinding.NoneAtInvisible, retInfo, synExpr, synExpr.Range, [], attribs, None, SynBindingTrivia.Zero)

[(SynMemberDefn.LetBindings ([binding], isStatic, false, mWholeAutoProp))]
[(SynMemberDefn.LetBindings ([binding], isStatic, false, mWholeAutoProp, SynMemberDefnLetBindingsTrivia.Zero))]

| SynMemberDefn.Interface (members=Some membs) -> membs |> List.collect preAutoProps
| SynMemberDefn.LetBindings _
Expand Down Expand Up @@ -5113,7 +5113,7 @@ let ElimSynModuleDeclExpr bind =
match bind with
| SynModuleDecl.Expr (expr, m) ->
let bind2 = SynBinding (None, SynBindingKind.StandaloneExpression, false, false, [], PreXmlDoc.Empty, SynInfo.emptySynValData, SynPat.Wild m, None, expr, m, DebugPointAtBinding.NoneAtDo, SynBindingTrivia.Zero)
SynModuleDecl.Let(false, [bind2], m)
SynModuleDecl.Let(false, [bind2], m, SynModuleDeclLetTrivia.Zero)
| _ -> bind

let TcMutRecDefnsEscapeCheck (binds: MutRecShapes<_, _, _>) env =
Expand Down Expand Up @@ -5187,12 +5187,12 @@ let TcModuleOrNamespaceElementsMutRec (cenv: cenv) parent typeNames m envInitial
let decls = typeDefs |> List.map MutRecShape.Tycon
decls, (false, false, attrs)

| SynModuleDecl.Let (letrec, binds, m) ->
| SynModuleDecl.Let (isRecursive = isRecursive; bindings = binds; range = m) ->
let binds =
if isNamespace then
CheckLetOrDoInNamespace binds m; []
else
if letrec then [MutRecShape.Lets binds]
if isRecursive then [MutRecShape.Lets binds]
else List.map (List.singleton >> MutRecShape.Lets) binds
binds, (false, false, attrs)

Expand Down Expand Up @@ -5292,7 +5292,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
| _ -> [ TMDefOpens openDecls ]
return (defns, [], []), env, env

| SynModuleDecl.Let (letrec, binds, m) ->
| SynModuleDecl.Let (isRecursive = isRecursive; bindings = binds; range = m) ->

match parent with
| ParentNone ->
Expand All @@ -5301,7 +5301,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem

| Parent parentModule ->
let containerInfo = ModuleOrNamespaceContainerInfo parentModule
if letrec then
if isRecursive then
let scopem = unionRanges m scopem
let binds = binds |> List.map (fun bind -> RecDefnBindingInfo(containerInfo, NoNewSlots, ModuleOrMemberBinding, bind))
let binds, env, _ = TcLetrecBindings WarnOnOverrides cenv env tpenv (binds, m, scopem)
Expand Down
21 changes: 11 additions & 10 deletions src/Compiler/Checking/CheckRecordSyntaxHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,14 @@ let BindOriginalRecdExpr (withExpr: SynExpr * BlockSeparator) mkRecdExpr =
None,
SynBindingTrivia.Zero)

SynExpr.LetOrUse(
isRecursive = false,
isUse = false,
isFromSource = false, // compiler generated during desugaring
isBang = false,
bindings = [ binding ],
body = mkRecdExpr (Some withExpr),
range = mOrigExprSynth,
trivia = SynExprLetOrUseTrivia.Zero
)
SynExpr.LetOrUse
{
IsRecursive = false
//isUse = false,
IsFromSource = false // compiler generated during desugaring
// isBang = false,
Bindings = [ binding ]
Body = mkRecdExpr (Some withExpr)
Range = mOrigExprSynth
Trivia = SynLetOrUseTrivia.Zero
}
Loading
Loading