From b99897aac7a82b55030fd22da90cdd042a932a95 Mon Sep 17 00:00:00 2001 From: nojaf Date: Mon, 12 Sep 2022 16:42:30 +0200 Subject: [PATCH 1/2] Only process EmptyModuleOrNamespaces when showHeader is true. --- src/Compiler/Checking/NicePrint.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compiler/Checking/NicePrint.fs b/src/Compiler/Checking/NicePrint.fs index dab7a9efdfc..e32789c9fe2 100644 --- a/src/Compiler/Checking/NicePrint.fs +++ b/src/Compiler/Checking/NicePrint.fs @@ -2433,7 +2433,7 @@ module InferredSigPrinting = wordL (tagKeyword keyword) ^^ sepListL SepL.dot pathL match expr with - | EmptyModuleOrNamespaces mspecs -> + | EmptyModuleOrNamespaces mspecs when showHeader -> List.map emptyModuleOrNamespace mspecs |> aboveListL | expr -> imdefL denv expr From cca18876b2d395169987562a7b764d8dcaaf05e8 Mon Sep 17 00:00:00 2001 From: nojaf Date: Tue, 13 Sep 2022 12:02:53 +0200 Subject: [PATCH 2/2] Update failing Cambridge tests. --- tests/fsharp/core/load-script/out.stdout.bsl | 4 +--- tests/fsharp/core/printing/output.1000.stdout.bsl | 6 +----- tests/fsharp/core/printing/output.200.stdout.bsl | 6 +----- tests/fsharp/core/printing/output.47.stdout.bsl | 8 ++------ tests/fsharp/core/printing/output.multiemit.stdout.bsl | 8 ++------ tests/fsharp/core/printing/output.off.stdout.bsl | 6 +----- tests/fsharp/core/printing/output.stdout.bsl | 8 ++------ 7 files changed, 10 insertions(+), 36 deletions(-) diff --git a/tests/fsharp/core/load-script/out.stdout.bsl b/tests/fsharp/core/load-script/out.stdout.bsl index 3651c81d195..0cbbd767c36 100644 --- a/tests/fsharp/core/load-script/out.stdout.bsl +++ b/tests/fsharp/core/load-script/out.stdout.bsl @@ -16,9 +16,7 @@ World -the end Test 3================================================= -> module FSI_0001 - -[Loading D:\staging\staging\src\tests\fsharp\core\load-script\1.fsx +> [Loading D:\staging\staging\src\tests\fsharp\core\load-script\1.fsx Loading D:\staging\staging\src\tests\fsharp\core\load-script\2.fsx Loading D:\staging\staging\src\tests\fsharp\core\load-script\3.fsx] Hello diff --git a/tests/fsharp/core/printing/output.1000.stdout.bsl b/tests/fsharp/core/printing/output.1000.stdout.bsl index b7d685cd23b..cdf91519c8d 100644 --- a/tests/fsharp/core/printing/output.1000.stdout.bsl +++ b/tests/fsharp/core/printing/output.1000.stdout.bsl @@ -1,6 +1,4 @@ -module FSI_0001 - > val it: unit = () > val repeatId: string = "A" @@ -236,9 +234,7 @@ module D1 = val words: System.Collections.Generic.IDictionary val words2000: System.Collections.Generic.IDictionary -> module FSI_0020 - -> module D2 = +> > module D2 = val words: IDictionary val words2000: IDictionary val opt1: 'a option diff --git a/tests/fsharp/core/printing/output.200.stdout.bsl b/tests/fsharp/core/printing/output.200.stdout.bsl index 98b5d8efe31..cb22322c94a 100644 --- a/tests/fsharp/core/printing/output.200.stdout.bsl +++ b/tests/fsharp/core/printing/output.200.stdout.bsl @@ -1,6 +1,4 @@ -module FSI_0001 - > val it: unit = () > val repeatId: string = "A" @@ -131,9 +129,7 @@ module D1 = val words: System.Collections.Generic.IDictionary val words2000: System.Collections.Generic.IDictionary -> module FSI_0020 - -> module D2 = +> > module D2 = val words: IDictionary val words2000: IDictionary val opt1: 'a option diff --git a/tests/fsharp/core/printing/output.47.stdout.bsl b/tests/fsharp/core/printing/output.47.stdout.bsl index 97426680947..b6f38074b36 100644 --- a/tests/fsharp/core/printing/output.47.stdout.bsl +++ b/tests/fsharp/core/printing/output.47.stdout.bsl @@ -1,7 +1,5 @@ -> module FSI_0001 - -val repeatId: string = "A" +> val repeatId: string = "A" > val repeatId: string = "B" @@ -251,9 +249,7 @@ module D1 = val words: System.Collections.Generic.IDictionary val words2000: System.Collections.Generic.IDictionary -> module FSI_0019 - -> module D2 = +> > module D2 = val words: IDictionary val words2000: IDictionary val opt1: 'a option diff --git a/tests/fsharp/core/printing/output.multiemit.stdout.bsl b/tests/fsharp/core/printing/output.multiemit.stdout.bsl index 8c645cb52d1..9183285f872 100644 --- a/tests/fsharp/core/printing/output.multiemit.stdout.bsl +++ b/tests/fsharp/core/printing/output.multiemit.stdout.bsl @@ -1,7 +1,5 @@ -> module FSI_0001 - -val repeatId: string = "A" +> val repeatId: string = "A" > val repeatId: string = "B" @@ -251,9 +249,7 @@ module D1 = val words: System.Collections.Generic.IDictionary val words2000: System.Collections.Generic.IDictionary -> module FSI_0019 - -> module D2 = +> > module D2 = val words: IDictionary val words2000: IDictionary val opt1: 'a option diff --git a/tests/fsharp/core/printing/output.off.stdout.bsl b/tests/fsharp/core/printing/output.off.stdout.bsl index b2d1f1f8e6a..586d7a58860 100644 --- a/tests/fsharp/core/printing/output.off.stdout.bsl +++ b/tests/fsharp/core/printing/output.off.stdout.bsl @@ -1,6 +1,4 @@ -module FSI_0001 - > val it: unit = () > val repeatId: string @@ -96,9 +94,7 @@ module D1 = val words: System.Collections.Generic.IDictionary val words2000: System.Collections.Generic.IDictionary -> module FSI_0020 - -> module D2 = +> > module D2 = val words: IDictionary val words2000: IDictionary val opt1: 'a option diff --git a/tests/fsharp/core/printing/output.stdout.bsl b/tests/fsharp/core/printing/output.stdout.bsl index 8c645cb52d1..9183285f872 100644 --- a/tests/fsharp/core/printing/output.stdout.bsl +++ b/tests/fsharp/core/printing/output.stdout.bsl @@ -1,7 +1,5 @@ -> module FSI_0001 - -val repeatId: string = "A" +> val repeatId: string = "A" > val repeatId: string = "B" @@ -251,9 +249,7 @@ module D1 = val words: System.Collections.Generic.IDictionary val words2000: System.Collections.Generic.IDictionary -> module FSI_0019 - -> module D2 = +> > module D2 = val words: IDictionary val words2000: IDictionary val opt1: 'a option