diff --git a/Check.fs b/Check.fs index c4a3a6c..ae3837a 100644 --- a/Check.fs +++ b/Check.fs @@ -232,9 +232,9 @@ let private options: Build.Options = { Build.dependencyOptions with IsLibrary = /// check failed with nothing collected: a failure the compiler printed rather /// than recorded, such as a bug in it, which would otherwise fail silently. let file (buffers: Map) (path: string) : Found list = - Diagnostics.verbose <- false + Diagnostics.verbose.Value <- false Diagnostics.reset () - Paths.sourceOverrides <- buffers + Paths.sourceOverrides.Value <- buffers // The text the check reads, for what to mark at a column and for where // the types it infers are. @@ -256,7 +256,7 @@ let file (buffers: Map) (path: string) : Found list = printfn "%s" (Diagnostics.humanize ex.Message) 1) finally - Paths.sourceOverrides <- Map.empty + Paths.sourceOverrides.Value <- Map.empty // With BJOLANG_TIMING set, where the check's time went, to the log. if Timing.enabled then diff --git a/Expansion.fs b/Expansion.fs index e76c65a..8687948 100644 --- a/Expansion.fs +++ b/Expansion.fs @@ -143,7 +143,7 @@ let private renamed = Collections.Generic.Dictionary() let recording (path: string) (check: unit -> 'a) : 'a = let seen = ResizeArray() - Macro.observe <- + Macro.observe.Value <- Some(fun macro site input output names -> for KeyValue(fresh, original) in names do renamed[fresh] <- original @@ -157,7 +157,7 @@ let recording (path: string) (check: unit -> 'a) : 'a = try check () finally - Macro.observe <- None + Macro.observe.Value <- None let full = IO.Path.GetFullPath path // A form can be expanded more than once in one check, as a diff --git a/Fixes.fs b/Fixes.fs index 2b423f3..b54e7e7 100644 --- a/Fixes.fs +++ b/Fixes.fs @@ -28,16 +28,16 @@ let recording (path: string) (check: unit -> 'a) : 'a = let missing = ResizeArray() let holes = ResizeArray() let signatures = ResizeArray() - 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 diff --git a/Program.fs b/Program.fs index 175c166..cbab710 100644 --- a/Program.fs +++ b/Program.fs @@ -30,7 +30,7 @@ let private useInstalledCompiler () = let installed = IO.Path.Combine(Bjolang.Paths.root, "bin", "compiler", "Bjolang.dll") if IO.File.Exists installed then - Bjolang.Paths.compilerAssembly <- installed + Bjolang.Paths.compilerAssembly.Value <- installed Environment.SetEnvironmentVariable("BJOLANG_OUT_OF_PROCESS_DEPS", "1") Bjolang.Build.installDependencyBackend () Environment.SetEnvironmentVariable("BJOLANG_OUT_OF_PROCESS_DEPS", null) diff --git a/Types.fs b/Types.fs index ccb74a6..26bd5d4 100644 --- a/Types.fs +++ b/Types.fs @@ -194,7 +194,7 @@ let recording (path: string) (text: string) (check: unit -> 'a) : 'a = let full = IO.Path.GetFullPath path let mutable index = empty - Inference.observe <- + Inference.observe.Value <- Some(fun env decls -> // The first program with names in the file is the file's: one // checked before it is a dependency's. @@ -204,7 +204,7 @@ let recording (path: string) (text: string) (check: unit -> 'a) : 'a = try check () finally - Inference.observe <- None + Inference.observe.Value <- None byFile[full] <- index checkedTexts[full] <- text