The compiler's values of a compilation are written as .Value

The compiler keeps the state of a compilation in a context
(Compilation.fs, on its branch compilation-context), and a value that was a
module-level mutable is a Per. The server sets Diagnostics.verbose,
Paths.sourceOverrides, Paths.compilerAssembly and the five observers, each
now as x.Value <- ...

No change to what the server does: every check still runs in the one root
context.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Linus Björnstam 2026-11-25 08:39:42 +01:00
parent ce426b94df
commit c5acafd5dd
5 changed files with 14 additions and 14 deletions

View file

@ -28,16 +28,16 @@ let recording (path: string) (check: unit -> 'a) : 'a =
let missing = ResizeArray<Exhaustiveness.MissingClauses>()
let holes = ResizeArray<Holes.Fillers>()
let signatures = ResizeArray<CheckDecl.MissingSignature>()
Exhaustiveness.observe <- Some(fun m -> if inFile m.Range then missing.Add m)
Holes.observe <- Some(fun h -> if inFile h.Range then holes.Add h)
CheckDecl.observeMissingSignature <- Some(fun s -> if inFile s.Range then signatures.Add s)
Exhaustiveness.observe.Value <- Some(fun m -> if inFile m.Range then missing.Add m)
Holes.observe.Value <- Some(fun h -> if inFile h.Range then holes.Add h)
CheckDecl.observeMissingSignature.Value <- Some(fun s -> if inFile s.Range then signatures.Add s)
try
check ()
finally
Exhaustiveness.observe <- None
Holes.observe <- None
CheckDecl.observeMissingSignature <- None
Exhaustiveness.observe.Value <- None
Holes.observe.Value <- None
CheckDecl.observeMissingSignature.Value <- None
byFile[full] <-
{ Missing = missing |> Seq.distinctBy (fun m -> m.Range) |> List.ofSeq