Skip to content

Commit

Permalink
fantomas
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyme committed May 6, 2023
1 parent 605cde1 commit f2f698d
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/Compiler/Driver/CompilerDiagnostics.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1269,8 +1269,8 @@ type Exception with
| Parser.TOKEN_INTERP_STRING_BEGIN_PART -> SR.GetString("Parser.TOKEN.INTERP.STRING.BEGIN.PART")
| Parser.TOKEN_INTERP_STRING_PART -> SR.GetString("Parser.TOKEN.INTERP.STRING.PART")
| Parser.TOKEN_INTERP_STRING_END -> SR.GetString("Parser.TOKEN.INTERP.STRING.END")
| Parser.TOKEN_WITHNULL__ -> SR.GetString("Parser.TOKEN.WITHNULL__")
| Parser.TOKEN_NOTNULL__ -> SR.GetString("Parser.TOKEN.NOTNULL__")
| Parser.TOKEN_WITHNULL__ -> SR.GetString("Parser.TOKEN.WITHNULL__")
| Parser.TOKEN_NOTNULL__ -> SR.GetString("Parser.TOKEN.NOTNULL__")
| unknown ->
let result = sprintf "unknown token tag %+A" unknown
Debug.Assert(false, result)
Expand Down
3 changes: 2 additions & 1 deletion src/Compiler/Driver/CompilerImports.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ val IsOptimizationDataResourceB: ILResource -> bool
/// Determine if an IL resource attached to an F# assembly is an F# quotation data resource for reflected definitions
val IsReflectedDefinitionsResource: ILResource -> bool

val GetResourceNameAndSignatureDataFuncs: ILResource list -> (string * ((unit -> ReadOnlyByteMemory) * (unit -> ReadOnlyByteMemory) option)) list
val GetResourceNameAndSignatureDataFuncs:
ILResource list -> (string * ((unit -> ReadOnlyByteMemory) * (unit -> ReadOnlyByteMemory) option)) list

/// Encode the F# interface data into a set of IL attributes and resources
val EncodeSignatureData:
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Driver/GraphChecking/FileContentMapping.fs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ let visitSynType (t: SynType) : FileContentEntry list =
let continuations = List.map (snd >> visit) fields
Continuation.concatenate continuations continuation
| SynType.Array (elementType = elementType) -> visit elementType continuation
| SynType.WithNull(innerType = innerType) -> visit innerType continuation
| SynType.WithNull (innerType = innerType) -> visit innerType continuation
| SynType.Fun (argType, returnType, _, _) ->
let continuations = List.map visit [ argType; returnType ]
Continuation.concatenate continuations continuation
Expand Down
6 changes: 4 additions & 2 deletions src/Compiler/Driver/StaticLinking.fs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ let StaticLinkILModules

// Save only the interface/optimization attributes of generated data
let intfDataResources, others =
allResources |> List.partition (fun (_, r) -> IsSignatureDataResource r || IsSignatureDataResourceB r)
allResources
|> List.partition (fun (_, r) -> IsSignatureDataResource r || IsSignatureDataResourceB r)

let intfDataResources =
[
Expand All @@ -193,7 +194,8 @@ let StaticLinkILModules
]

let optDataResources, others =
others |> List.partition (fun (_, r) -> IsOptimizationDataResource r || IsOptimizationDataResourceB r)
others
|> List.partition (fun (_, r) -> IsOptimizationDataResource r || IsOptimizationDataResourceB r)

let optDataResources =
[
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Facilities/LanguageFeatures.fs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ type LanguageVersion(versionText) =
| LanguageFeature.FromEndSlicing -> FSComp.SR.featureFromEndSlicing ()
| LanguageFeature.FixedIndexSlice3d4d -> FSComp.SR.featureFixedIndexSlice3d4d ()
| LanguageFeature.AndBang -> FSComp.SR.featureAndBang ()
| LanguageFeature.NullnessChecking -> FSComp.SR.featureNullnessChecking()
| LanguageFeature.NullnessChecking -> FSComp.SR.featureNullnessChecking ()
| LanguageFeature.ResumableStateMachines -> FSComp.SR.featureResumableStateMachines ()
| LanguageFeature.NullableOptionalInterop -> FSComp.SR.featureNullableOptionalInterop ()
| LanguageFeature.DefaultInterfaceMemberConsumption -> FSComp.SR.featureDefaultInterfaceMemberConsumption ()
Expand Down
12 changes: 6 additions & 6 deletions src/Compiler/Legacy/LegacyHostedCompilerForTesting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ type internal FscCompiler(legacyReferenceResolver) =
// compensate for this in case caller didn't know
let args =
match box args with
| Null -> [|"fsc"|]
| _ ->
match args with
| [||] -> [|"fsc"|]
| a when not <| fscExeArg a[0] -> Array.append [| "fsc" |] a
| _ -> args
| Null -> [| "fsc" |]
| _ ->
match args with
| [||] -> [| "fsc" |]
| a when not <| fscExeArg a[0] -> Array.append [| "fsc" |] a
| _ -> args

let errorRanges = args |> Seq.exists errorRangesArg
let vsErrors = args |> Seq.exists vsErrorsArg
Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/SyntaxTree/PrettyNaming.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1106,11 +1106,11 @@ let FSharpOptimizationCompressedDataResourceName =

let FSharpSignatureCompressedDataResourceName = "FSharpSignatureCompressedData."

let FSharpOptimizationCompressedDataResourceNameB = "FSharpOptimizationCompressedDataB."
let FSharpOptimizationCompressedDataResourceNameB =
"FSharpOptimizationCompressedDataB."

let FSharpSignatureCompressedDataResourceNameB = "FSharpSignatureCompressedDataB."


// For historical reasons, we use a different resource name for FSharp.Core, so older F# compilers
// don't complain when they see the resource. The prefix of these names must not be 'FSharpOptimizationData'
// or 'FSharpSignatureData'
Expand Down
1 change: 0 additions & 1 deletion src/FSharp.Core/async.fs
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,6 @@ module AsyncPrimitives =
#endif
MakeAsyncWithCancelCheck(fun ctxt -> ctxt.PostWithTrampoline syncCtxt ctxt.cont)


/// - Initial cancellation check
/// - Create Thread and call Start() with exception protection. We don't expect this
/// to fail but protect nevertheless.
Expand Down

0 comments on commit f2f698d

Please sign in to comment.