File tree Expand file tree Collapse file tree 1 file changed +6
-18
lines changed Expand file tree Collapse file tree 1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -8,18 +8,6 @@ open System.Collections.Generic
88open System.Runtime .InteropServices
99open FSharp.Compiler .DiagnosticsLogger
1010
11- [<AutoOpen>]
12- module internal ConsoleHelpers =
13-
14- #if NO_ CHECKNULLS
15- type MaybeNull < 'T when 'T : null > = 'T
16-
17- // Shim to match nullness checking library support in preview
18- let inline (| Null | NonNull |) ( x : 'T ) : Choice < unit , 'T > = match x with null -> Null | v -> NonNull v
19- #else
20- type MaybeNull < 'T when 'T : not null > = 'T | null
21- #endif
22-
2311type internal Style =
2412 | Prompt
2513 | Out
@@ -42,17 +30,17 @@ type internal History() =
4230 list.Clear()
4331 current <- - 1
4432
45- member _.Add ( line : string MaybeNull ) =
33+ member _.Add ( line : string | null ) =
4634 match line with
47- | Null
35+ | null
4836 | " " -> ()
49- | NonNull line -> list.Add( line)
37+ | _ -> list.Add( line)
5038
51- member _.AddLast ( line : string MaybeNull ) =
39+ member _.AddLast ( line : string | null ) =
5240 match line with
53- | Null
41+ | null
5442 | " " -> ()
55- | NonNull line ->
43+ | _ ->
5644 list.Add( line)
5745 current <- list.Count
5846
You can’t perform that action at this time.
0 commit comments