Skip to content

Commit

Permalink
bump FCS to 41.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Mar 4, 2022
1 parent a416904 commit e7e069a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog][Keep a Changelog] and this project adh

## [Released]

## [0.13.0] - 2022-03-04

- Updated to FCS 41.0.3

## [0.12.0] - 2022-03-04

- Updated to FCS 41.0.2 (thanks @xperiandri!)
Expand Down
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source https://api.nuget.org/v3/index.json
storage: none
framework: netstandard2.0, net5.0

nuget FSharp.Compiler.Service 41.0.2
nuget FSharp.Compiler.Service 41.0.3
nuget FSharp.Core ~> 6
nuget Fantomas

Expand Down
16 changes: 8 additions & 8 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ NUGET
Fantomas (4.6.5)
FSharp.Compiler.Service (>= 41.0.1)
FSharp.Core (>= 6.0.1)
FSharp.Compiler.Service (41.0.2)
FSharp.Core (6.0.2)
Microsoft.Build.Framework (>= 17.0.0-preview-21515-03)
Microsoft.Build.Tasks.Core (>= 17.0.0-preview-21515-03)
Microsoft.Build.Utilities.Core (>= 17.0.0-preview-21515-03)
FSharp.Compiler.Service (41.0.3)
FSharp.Core (6.0.3)
Microsoft.Build.Framework (>= 17.0)
Microsoft.Build.Tasks.Core (>= 17.0)
Microsoft.Build.Utilities.Core (>= 17.0)
System.Buffers (>= 4.5.1)
System.Collections.Immutable (>= 5.0)
System.Diagnostics.Process (>= 4.3)
Expand All @@ -23,7 +23,7 @@ NUGET
System.Reflection.Metadata (>= 5.0)
System.Reflection.TypeExtensions (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.CompilerServices.Unsafe (>= 5.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Runtime.InteropServices (>= 4.3)
System.Runtime.Loader (>= 4.3)
System.Security.Claims (>= 4.3)
Expand All @@ -32,7 +32,7 @@ NUGET
System.Threading.Tasks.Parallel (>= 4.3)
System.Threading.Thread (>= 4.3)
System.Threading.ThreadPool (>= 4.3)
FSharp.Core (6.0.2)
FSharp.Core (6.0.3)
Microsoft.Build.Framework (17.0)
System.Security.Permissions (>= 4.7)
Microsoft.Build.Tasks.Core (17.0)
Expand Down Expand Up @@ -379,7 +379,7 @@ NUGET
System.Runtime (4.3.1)
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
System.Runtime.CompilerServices.Unsafe (5.0)
System.Runtime.CompilerServices.Unsafe (6.0)
System.Runtime.Extensions (4.3.1)
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
Expand Down
11 changes: 5 additions & 6 deletions src/AstCreate.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ open FSharp.Compiler.Text
open FSharp.Compiler.Text.Range
open FSharp.Compiler.Text.Position
open FSharp.Compiler.Xml
open FSharp.Compiler.SyntaxTrivia

type Ident with
static member Create text =
Expand Down Expand Up @@ -59,7 +60,7 @@ type QualifiedNameOfFile with

type SynMemberFlags with
static member InstanceMember : SynMemberFlags =
{ IsInstance = true; MemberKind = SynMemberKind.Member; IsDispatchSlot = false; IsOverrideOrExplicitImpl = false; IsFinal = false }
{ IsInstance = true; MemberKind = SynMemberKind.Member; IsDispatchSlot = false; IsOverrideOrExplicitImpl = false; IsFinal = false; Trivia = SynMemberFlagsTrivia.Zero }
static member StaticMember =
{ SynMemberFlags.InstanceMember with IsInstance = false }

Expand Down Expand Up @@ -370,7 +371,6 @@ type SynBindingRcd with
ValData = SynValData(Some SynMemberFlags.InstanceMember, SynValInfo.Empty, None)
Pattern = SynPatRcd.CreateNull
ReturnInfo = None
EqualsRange = None
Expr = SynExpr.Null range0
Range = range0
Bind = DebugPointAtBinding.NoneAtInvisible
Expand Down Expand Up @@ -419,6 +419,7 @@ type SynMemberDefn with
IsDispatchSlot = false;
IsFinal = false
MemberKind = SynMemberKind.Member
Trivia = SynMemberFlagsTrivia.Zero
}
let staticBinding = { binding with ValData = SynValData.SynValData(staticMemberFlags, valInfo, identifier) }
SynMemberDefn.Member(staticBinding.FromRcd, range0)
Expand All @@ -435,6 +436,7 @@ type SynMemberDefn with
IsDispatchSlot = false;
IsFinal = false
MemberKind = SynMemberKind.Member
Trivia = SynMemberFlagsTrivia.Zero
}
let overrideBinding = { binding with ValData = SynValData.SynValData(overrideMemberFlags, valInfo, identifier) }
SynMemberDefn.Member(overrideBinding.FromRcd, range0)
Expand All @@ -453,15 +455,13 @@ type SynTypeDefnReprObjectModelRcd with
type SynTypeDefnRcd with
static member Create (info: SynComponentInfoRcd, members) =
{ Info = info
EqualsRange = None
Repr = SynTypeDefnReprObjectModelRcd.Create(members).FromRcd
Members = []
ImplicitConstructor = None
Range = range0
}
static member CreateSimple (info: SynComponentInfoRcd, simple: SynTypeDefnSimpleRepr, ?members) =
{ Info = info
EqualsRange = None
Repr = SynTypeDefnRepr.Simple(simple, range0)
Members = Option.defaultValue [] members
ImplicitConstructor = None
Expand Down Expand Up @@ -490,7 +490,7 @@ type SynModuleDecl with
static member CreateAttributes(attributes) =
SynModuleDecl.Attributes(attributes, range0)
static member CreateNestedModule(info : SynComponentInfoRcd, members) =
SynModuleDecl.NestedModule(info.FromRcd, false, None, members, false, range0)
SynModuleDecl.NestedModule(info.FromRcd, false, members, false, range0, SynModuleDeclNestedModuleTrivia.Zero)
static member CreateTypes (types: SynTypeDefnRcd list) =
SynModuleDecl.Types(types |> List.map (fun t -> t.FromRcd), range0)

Expand Down Expand Up @@ -576,7 +576,6 @@ type SynEnumCaseRcd with
static member Create (id, cnst) =
{ Attributes = SynAttributes.Empty
Id = id
EqualsRange = Range.Zero
Constant = cnst
ValueRange = Range.Zero
XmlDoc = PreXmlDoc.Empty
Expand Down
31 changes: 15 additions & 16 deletions src/AstRcd.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ open System
open FSharp.Compiler.Text
open FSharp.Compiler.Syntax
open FSharp.Compiler.Xml
open FSharp.Compiler.SyntaxTrivia
open FSharp.Compiler.Text.Range

type ParsedImplFileInputRcd = {
File: string
Expand Down Expand Up @@ -62,19 +64,18 @@ type SynComponentInfo with

type SynTypeDefnRcd = {
Info: SynComponentInfoRcd
EqualsRange: Range option
Repr: SynTypeDefnRepr
Members: SynMemberDefns
ImplicitConstructor: SynMemberDefn option
Range: range }
with
member x.FromRcd =
SynTypeDefn(x.Info.FromRcd, x.EqualsRange, x.Repr, x.Members, x.ImplicitConstructor, x.Range)
SynTypeDefn(x.Info.FromRcd, x.Repr, x.Members, x.ImplicitConstructor, x.Range, SynTypeDefnTrivia.Zero)

type SynTypeDefn with
member x.ToRcd =
let (SynTypeDefn(info, equalsRange, repr, members, implicitConstructor, range)) = x
{ Info = info.ToRcd; EqualsRange = equalsRange; Repr = repr; Members = members; ImplicitConstructor = implicitConstructor; Range = range }
let (SynTypeDefn(info, repr, members, implicitConstructor, range, _)) = x
{ Info = info.ToRcd; Repr = repr; Members = members; ImplicitConstructor = implicitConstructor; Range = range }

type SynTypeDefnReprObjectModelRcd = {
Kind: SynTypeDefnKind
Expand Down Expand Up @@ -287,7 +288,7 @@ and SynPatNullRcd with
and SynPatOptionalValRcd with
member x.FromRcd = SynPat.OptionalVal(x.Id, x.Range)
and SynPatOrRcd with
member x.FromRcd = SynPat.Or(x.Left.FromRcd, x.Right.FromRcd, x.Range)
member x.FromRcd = SynPat.Or(x.Left.FromRcd, x.Right.FromRcd, x.Range, { BarRange = range0 })
and SynPatAndsRcd with
member x.FromRcd = SynPat.Ands(x.Patterns |> List.map (fun pat -> pat.FromRcd), x.Range)
and SynPatArrayOrListRcd with
Expand Down Expand Up @@ -319,7 +320,7 @@ type SynPat with
SynPatRcd.Typed { Pattern = pattern.ToRcd; Type = typ; Range = range }
| SynPat.Attrib(pattern, attributes, range) ->
SynPatRcd.Attrib { Pattern = pattern.ToRcd; Attributes = attributes; Range = range }
| SynPat.Or(left, right, range) ->
| SynPat.Or(left, right, range, _) ->
SynPatRcd.Or { Left = left.ToRcd; Right = right.ToRcd; Range = range }
| SynPat.Ands(patterns, range) ->
SynPatRcd.Ands { Patterns = patterns |> List.map (fun pat -> pat.ToRcd); Range = range }
Expand Down Expand Up @@ -408,18 +409,17 @@ type SynBindingRcd = {
ValData: SynValData
Pattern: SynPatRcd
ReturnInfo: SynBindingReturnInfoRcd option
EqualsRange: Range option
Expr: SynExpr
Range: range
Bind: DebugPointAtBinding }
with
member x.FromRcd =
SynBinding(x.Access, x.Kind, x.IsInline, x.IsMutable, x.Attributes, x.XmlDoc, x.ValData, x.Pattern.FromRcd, x.ReturnInfo |> Option.map (fun ri -> ri.FromRcd), x.EqualsRange, x.Expr, x.Range, x.Bind)
SynBinding(x.Access, x.Kind, x.IsInline, x.IsMutable, x.Attributes, x.XmlDoc, x.ValData, x.Pattern.FromRcd, x.ReturnInfo |> Option.map (fun ri -> ri.FromRcd), x.Expr, x.Range, x.Bind, SynBindingTrivia.Zero)

type SynBinding with
member x.ToRcd =
let (SynBinding(access, kind, isInline, isMutable, attrs, xmlDoc, info, pattern, returnInfo, equalsRange, rhsExpr, mBind, spBind)) = x
{ Access = access; Kind = kind; IsInline = isInline; IsMutable = isMutable; Attributes = attrs; XmlDoc = xmlDoc; ValData = info; Pattern = pattern.ToRcd; ReturnInfo = returnInfo |> Option.map (fun ri -> ri.ToRcd); EqualsRange = equalsRange; Expr = rhsExpr; Range = mBind; Bind = spBind }
let (SynBinding(access, kind, isInline, isMutable, attrs, xmlDoc, info, pattern, returnInfo, rhsExpr, mBind, spBind, _)) = x
{ Access = access; Kind = kind; IsInline = isInline; IsMutable = isMutable; Attributes = attrs; XmlDoc = xmlDoc; ValData = info; Pattern = pattern.ToRcd; ReturnInfo = returnInfo |> Option.map (fun ri -> ri.ToRcd); Expr = rhsExpr; Range = mBind; Bind = spBind }

[<RequireQualifiedAccess>]
type SynTypeDefnSimpleReprRcd =
Expand Down Expand Up @@ -515,20 +515,19 @@ type SynTypeDefnSimpleRepr with
type SynEnumCaseRcd = {
Attributes: SynAttributes
Id: Ident
EqualsRange: Range
Constant: SynConst
ValueRange: Range
XmlDoc: PreXmlDoc
Range: range }
with
member x.FromRcd =
SynEnumCase(x.Attributes, x.Id, x.EqualsRange, x.Constant, x.ValueRange, x.XmlDoc, x.Range)
SynEnumCase(x.Attributes, x.Id, x.Constant, x.ValueRange, x.XmlDoc, x.Range, { BarRange = None; EqualsRange = range0 } )

type SynEnumCase with
member x.ToRcd =
match x with
| SynEnumCase(attributes, id, equalsRange, constant, valueRange, xmlDoc, range) ->
{ Attributes = attributes; Id = id; EqualsRange = equalsRange; Constant = constant; ValueRange = valueRange; XmlDoc = xmlDoc; Range = range }
| SynEnumCase(attributes, id, constant, valueRange, xmlDoc, range, _) ->
{ Attributes = attributes; Id = id; Constant = constant; ValueRange = valueRange; XmlDoc = xmlDoc; Range = range }

type XmlDoc with
member x.Lines =
Expand All @@ -547,7 +546,7 @@ type SynUnionCaseRcd = {
Range: range }
with
member x.FromRcd =
SynUnionCase(x.Attributes, x.Id, x.Type, x.XmlDoc, x.Access, x.Range)
SynUnionCase(x.Attributes, x.Id, x.Type, x.XmlDoc, x.Access, x.Range, { BarRange = None })
member x.HasFields =
match x.Type with
| SynUnionCaseKind.Fields cases -> not cases.IsEmpty
Expand All @@ -556,7 +555,7 @@ with
type SynUnionCase with
member x.ToRcd : SynUnionCaseRcd =
match x with
| SynUnionCase(attributes, id, typ, xmlDoc, access, range) ->
| SynUnionCase(attributes, id, typ, xmlDoc, access, range, _) ->
{ Attributes = attributes; Id = id; Type = typ; XmlDoc = xmlDoc; Access = access; Range = range }

type SynFieldRcd = {
Expand Down

0 comments on commit e7e069a

Please sign in to comment.