Skip to content

Commit d18cfe7

Browse files
committed
fantomas
1 parent b3c7a76 commit d18cfe7

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

src/Compiler/Driver/CompilerDiagnostics.fsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ type PhasedDiagnostic with
5959

6060
/// Format the core of the diagnostic as a string. Doesn't include the range information.
6161
member FormatCore: flattenErrors: bool * suggestNames: bool -> string
62-
62+
6363
/// Compute new severity according to the various diagnostics options
6464
member AdjustSeverity: FSharpDiagnosticOptions -> FSharpDiagnosticSeverity
65-
65+
6666
/// Output all of a diagnostic to a buffer, including range
6767
member Output: buf: StringBuilder * tcConfig: TcConfig * severity: FSharpDiagnosticSeverity -> unit
6868

src/Compiler/Facilities/DiagnosticsLogger.fs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,13 @@ type PhasedDiagnostic =
291291
}
292292

293293
/// Construct a phased error
294-
static member Create(exn: exn, phase: BuildPhase, severity: FSharpDiagnosticSeverity) : PhasedDiagnostic = { Exception = exn; Phase = phase; Severity = severity; DefaultSeverity = severity }
294+
static member Create(exn: exn, phase: BuildPhase, severity: FSharpDiagnosticSeverity) : PhasedDiagnostic =
295+
{
296+
Exception = exn
297+
Phase = phase
298+
Severity = severity
299+
DefaultSeverity = severity
300+
}
295301

296302
member this.DebugDisplay() =
297303
sprintf "%s: %s" (this.Subcategory()) this.Exception.Message
@@ -460,7 +466,9 @@ module DiagnosticsLoggerExtensions =
460466
PreserveStackTrace exn
461467
raise exn
462468
| _ ->
463-
let diagnostic =PhasedDiagnostic.Create(exn, DiagnosticsThreadStatics.BuildPhase, severity)
469+
let diagnostic =
470+
PhasedDiagnostic.Create(exn, DiagnosticsThreadStatics.BuildPhase, severity)
471+
464472
x.DiagnosticSink(diagnostic)
465473

466474
member x.ErrorR exn =

src/Compiler/Service/FSharpCheckerResults.fs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,17 +2895,18 @@ module internal ParseAndCheckFile =
28952895
(diagnostic.Subcategory())
28962896
)
28972897

2898-
{ diagnostic with Phase = BuildPhase.TypeCheck }
2898+
{ diagnostic with
2899+
Phase = BuildPhase.TypeCheck
2900+
}
28992901
else
29002902
diagnostic
29012903

29022904
if reportErrors then
29032905
match diagnostic with
29042906
#if !NO_TYPEPROVIDERS
2905-
| { Exception = :? TypeProviderError as tpe } ->
2906-
tpe.Iter(fun exn ->
2907-
collectOne
2908-
{ diagnostic with Exception = exn })
2907+
| {
2908+
Exception = :? TypeProviderError as tpe
2909+
} -> tpe.Iter(fun exn -> collectOne { diagnostic with Exception = exn })
29092910
#endif
29102911
| _ -> collectOne diagnostic
29112912

src/Compiler/Service/FSharpProjectSnapshot.fs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,8 @@ type internal FSharpFileSnapshotWithSource
151151

152152
/// A source file snapshot with parsed syntax tree
153153
type internal FSharpParsedFile
154-
(
155-
FileName: string,
156-
SyntaxTreeHash: byte array,
157-
SourceText: ISourceText,
158-
ParsedInput: ParsedInput,
159-
ParseDiagnostics: PhasedDiagnostic[]
160-
) =
154+
(FileName: string, SyntaxTreeHash: byte array, SourceText: ISourceText, ParsedInput: ParsedInput, ParseDiagnostics: PhasedDiagnostic[])
155+
=
161156

162157
member _.FileName = FileName
163158
member _.SourceText = SourceText

0 commit comments

Comments
 (0)