[Git][ghc/ghc][wip/interface-loading-errs] fixes

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu Mar 16 13:42:39 UTC 2023



Matthew Pickering pushed to branch wip/interface-loading-errs at Glasgow Haskell Compiler / GHC


Commits:
d789fd0d by Matthew Pickering at 2023-03-16T13:42:26+00:00
fixes

- - - - -


30 changed files:

- compiler/GHC/Tc/Errors/Ppr.hs
- testsuite/tests/cabal/cabal05/cabal05.stderr
- testsuite/tests/cabal/ghcpkg04.stderr
- testsuite/tests/driver/driver063.stderr
- testsuite/tests/driver/dynamicToo/dynamicToo001/dynamicToo001.stderr
- testsuite/tests/driver/dynamicToo/dynamicToo001boot/dynamicToo001boot.stderr
- testsuite/tests/driver/multipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr
- testsuite/tests/ghc-api/target-contents/TargetContents.stderr
- testsuite/tests/ghc-e/should_fail/T9905fail1.stderr
- testsuite/tests/ghc-e/should_run/T2636.stderr
- testsuite/tests/ghci.debugger/scripts/dynbrk001.stderr
- testsuite/tests/ghci/scripts/T20455.stderr
- testsuite/tests/ghci/scripts/T5836.stderr
- testsuite/tests/ghci/scripts/T5979.stderr
- testsuite/tests/ghci/should_fail/T15055.stderr
- testsuite/tests/module/mod1.stderr
- testsuite/tests/module/mod2.stderr
- testsuite/tests/package/T4806.stderr
- testsuite/tests/package/T4806a.stderr
- testsuite/tests/package/package01e.stderr
- testsuite/tests/package/package06e.stderr
- testsuite/tests/package/package07e.stderr
- testsuite/tests/package/package08e.stderr
- testsuite/tests/package/package09e.stderr
- testsuite/tests/perf/compiler/parsing001.stderr
- testsuite/tests/plugins/T11244.stderr
- testsuite/tests/plugins/plugins03.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang07.stderr
- testsuite/tests/th/T10279.stderr
- testsuite/tests/typecheck/should_fail/tcfail082.stderr


Changes:

=====================================
compiler/GHC/Tc/Errors/Ppr.hs
=====================================
@@ -2443,7 +2443,7 @@ prettyCantFindWhat AmbiguousInterface= (text "Ambiguous interface for", colon)
 cantFindError :: Bool -> CantFindInstalled -> SDoc
 cantFindError verbose (CantFindInstalled mod_name what cfir) =
   let (ppr_what, punct) = prettyCantFindWhat what in
-  hang (ppr_what <+> quotes (ppr mod_name) <> punct) 4 $
+  (ppr_what <+> quotes (ppr mod_name) <> punct) $$
   case cfir of
     NoUnitIdMatching pkg cands ->
 
@@ -2461,7 +2461,7 @@ cantFindError verbose (CantFindInstalled mod_name what cfir) =
              [] -> empty
 
       in hsep [ text "no unit id matching" <+> quotes (ppr pkg)
-              , text "was found" $$ looks_like_srcpkgid ]
+              , text "was found"] $$ looks_like_srcpkgid
     MissingPackageFiles pkg files ->
       text "There are files missing in the " <> quotes (ppr pkg) <>
       text " package," $$


=====================================
testsuite/tests/cabal/cabal05/cabal05.stderr
=====================================
@@ -1,5 +1,5 @@
 
-T.hs:3:1: error:
+T.hs:3:1: error: [GHC-00022]
     Ambiguous module name ‘Conflict’:
-      it is bound as p-0.1.0.0:P2 by a reexport in package q-0.1.0.0
-      it is bound as P by a reexport in package r-0.1.0.0
+    it is bound as p-0.1.0.0:P2 by a reexport in package q-0.1.0.0
+    it is bound as P by a reexport in package r-0.1.0.0


=====================================
testsuite/tests/cabal/ghcpkg04.stderr
=====================================
@@ -1,4 +1,4 @@
 
-ghcpkg04.hs:1:1: error:
+ghcpkg04.hs:1:1: error: [GHC-00022]
     Ambiguous module name ‘A’:
-      it was found in multiple packages: newtestpkg-2.0 testpkg-1.2.3.4
+    it was found in multiple packages: newtestpkg-2.0 testpkg-1.2.3.4


=====================================
testsuite/tests/driver/driver063.stderr
=====================================
@@ -1,4 +1,4 @@
 
-D063.hs:2:1: error:
-    Could not find module ‘A063’
+D063.hs:2:1: error: [GHC-00024]
+    Could not find module ‘A063’.
     It is not a module in the current program, or in any known package.


=====================================
testsuite/tests/driver/dynamicToo/dynamicToo001/dynamicToo001.stderr
=====================================
@@ -1,5 +1,5 @@
 
-C.hs:5:1: error:
+C.hs:5:1: error: [GHC-00005]
     Dynamic hash doesn't match for ‘B’
     Normal interface file from ./B.hi
     Dynamic interface file from ./B.dyn_hi


=====================================
testsuite/tests/driver/dynamicToo/dynamicToo001boot/dynamicToo001boot.stderr
=====================================
@@ -1,5 +1,5 @@
 
-C.hs:5:1: error:
+C.hs:5:1: error: [GHC-00005]
     Dynamic hash doesn't match for ‘B’
     Normal interface file from ./B.hi-boot
     Dynamic interface file from ./B.dyn_hi-boot


=====================================
testsuite/tests/driver/multipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr
=====================================
@@ -1,5 +1,5 @@
 
-module-visibility-import/MV.hs:5:1: error:
-    Could not load module ‘MV2’
+module-visibility-import/MV.hs:5:1: error: [GHC-00017]
+    Could not load module ‘MV2’.
     it is a hidden module in the package ‘mv’
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/ghc-api/target-contents/TargetContents.stderr
=====================================
@@ -16,8 +16,8 @@ B.hs:3:5: error: [GHC-88464] Variable not in scope: z
 B.hs:3:5: error: [GHC-88464] Variable not in scope: z
 == Dep_Error_MM_A
 
-A.hs:3:1: error:
-    Could not find module ‘B’
+A.hs:3:1: error: [GHC-00017]
+    Could not find module ‘B’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 == Dep_DM_AB
 == Dep_Error_DM_AB
@@ -25,8 +25,8 @@ A.hs:3:1: error:
 B.hs:3:5: error: [GHC-88464] Variable not in scope: z
 == Dep_Error_DM_A
 
-A.hs:3:1: error:
-    Could not find module ‘B’
+A.hs:3:1: error: [GHC-00017]
+    Could not find module ‘B’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 == Dep_MD_AB
 == Dep_Error_MD_AB


=====================================
testsuite/tests/ghc-e/should_fail/T9905fail1.stderr
=====================================
@@ -1,5 +1,5 @@
 
-<no location info>: error:
-    Could not find module ‘This.Module.Does.Not.Exist’
+<no location info>: error: [GHC-00024]
+    Could not find module ‘This.Module.Does.Not.Exist’.
     It is not a module in the current program, or in any known package.
 1


=====================================
testsuite/tests/ghc-e/should_run/T2636.stderr
=====================================
@@ -1,4 +1,4 @@
 
-T2636.hs:1:1: error:
-    Could not find module ‘MissingModule’
+T2636.hs:1:1: error: [GHC-00017]
+    Could not find module ‘MissingModule’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/ghci.debugger/scripts/dynbrk001.stderr
=====================================
@@ -1,4 +1,4 @@
 
-<no location info>:
-    Could not find module ‘NonModule’
+<no location info>: error: [GHC-00024]
+    Could not find module ‘NonModule’.
     It is not a module in the current program, or in any known package.


=====================================
testsuite/tests/ghci/scripts/T20455.stderr
=====================================
@@ -6,6 +6,6 @@
         ‘Ghci1.l’ (imported from Ghci1), ‘l’ (line 2),
         ‘all’ (imported from Prelude)
 
-<no location info>: error:
-    Could not find module ‘Ghci1’
+<no location info>: error: [GHC-00024]
+    Could not find module ‘Ghci1’.
     It is not a module in the current program, or in any known package.


=====================================
testsuite/tests/ghci/scripts/T5836.stderr
=====================================
@@ -1,4 +1,4 @@
 
-<no location info>:
-    Could not find module ‘Does.Not.Exist’
+<no location info>: error: [GHC-00024]
+    Could not find module ‘Does.Not.Exist’.
     It is not a module in the current program, or in any known package.


=====================================
testsuite/tests/ghci/scripts/T5979.stderr
=====================================
@@ -1,7 +1,7 @@
 
-<no location info>: error:
-    Could not find module ‘Control.Monad.Trans.State’
+<no location info>: error: [GHC-00020]
+    Could not find module ‘Control.Monad.Trans.State’.
     Perhaps you meant
-      Control.Monad.Trans.State (from transformers-0.5.6.2)
-      Control.Monad.Trans.Cont (from transformers-0.5.6.2)
-      Control.Monad.Trans.Class (from transformers-0.5.6.2)
+      Control.Monad.Trans.State (from transformers-0.6.1.0)
+      Control.Monad.Trans.Cont (from transformers-0.6.1.0)
+      Control.Monad.Trans.Class (from transformers-0.6.1.0)


=====================================
testsuite/tests/ghci/should_fail/T15055.stderr
=====================================
@@ -1,6 +1,6 @@
 
-<no location info>: error:
-    Could not load module ‘GHC’
-    It is a member of the hidden package ‘ghc-8.5’.
+<no location info>: error: [GHC-00017]
+    Could not load module ‘GHC’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)


=====================================
testsuite/tests/module/mod1.stderr
=====================================
@@ -1,4 +1,4 @@
 
-mod1.hs:3:1: error:
-    Could not find module ‘N’
+mod1.hs:3:1: error: [GHC-00017]
+    Could not find module ‘N’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/module/mod2.stderr
=====================================
@@ -1,4 +1,4 @@
 
-mod2.hs:3:1: error:
-    Could not find module ‘N’
+mod2.hs:3:1: error: [GHC-00017]
+    Could not find module ‘N’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/package/T4806.stderr
=====================================
@@ -1,6 +1,6 @@
 
-T4806.hs:1:1: error:
-    Could not load module ‘Data.Map’
-    It is a member of the package ‘containers-0.6.0.1’
+T4806.hs:1:1: error: [GHC-00017]
+    Could not load module ‘Data.Map’.
+    It is a member of the package ‘containers-0.6.7’
     which is ignored due to an -ignore-package flag
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/package/T4806a.stderr
=====================================
@@ -1,7 +1,7 @@
 
-T4806a.hs:1:1: error:
-    Could not load module ‘Data.Map’
-    It is a member of the package ‘containers-0.6.6’
+T4806a.hs:1:1: error: [GHC-00017]
+    Could not load module ‘Data.Map’.
+    It is a member of the package ‘containers-0.6.7’
     which is unusable because the -ignore-package flag was used to ignore at least one of its dependencies:
-      deepseq-1.4.8.0 template-haskell-2.20.0.0
+      deepseq-1.4.8.1 template-haskell-2.20.0.0
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/package/package01e.stderr
=====================================
@@ -1,14 +1,14 @@
 
-package01e.hs:2:1: error:
-    Could not load module ‘Data.Map’
-    It is a member of the hidden package ‘containers-0.6.0.1’.
+package01e.hs:2:1: error: [GHC-00017]
+    Could not load module ‘Data.Map’.
+    It is a member of the hidden package ‘containers-0.6.7’.
     You can run ‘:set -package containers’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package01e.hs:3:1: error:
-    Could not load module ‘Data.IntMap’
-    It is a member of the hidden package ‘containers-0.6.0.1’.
+package01e.hs:3:1: error: [GHC-00017]
+    Could not load module ‘Data.IntMap’.
+    It is a member of the hidden package ‘containers-0.6.7’.
     You can run ‘:set -package containers’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/package/package06e.stderr
=====================================
@@ -1,14 +1,14 @@
 
-package06e.hs:2:1: error:
-    Could not load module ‘GHC.Hs.Type’
-    It is a member of the hidden package ‘ghc-8.7’.
+package06e.hs:2:1: error: [GHC-00017]
+    Could not load module ‘GHC.Hs.Type’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package06e.hs:3:1: error:
-    Could not load module ‘GHC.Types.Unique.FM’
-    It is a member of the hidden package ‘ghc-8.7’.
+package06e.hs:3:1: error: [GHC-00017]
+    Could not load module ‘GHC.Types.Unique.FM’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/package/package07e.stderr
=====================================
@@ -1,29 +1,29 @@
 
-package07e.hs:2:1: error:
-    Could not find module ‘GHC.Hs.MyTypes’
+package07e.hs:2:1: error: [GHC-00020]
+    Could not find module ‘GHC.Hs.MyTypes’.
     Perhaps you meant
-      GHC.Hs.Type (needs flag -package-id ghc-9.3)
-      GHC.Tc.Types (needs flag -package-id ghc-9.3)
-      GHC.Hs.Syn.Type (needs flag -package-id ghc-9.3)
+      GHC.Hs.Type (needs flag -package-id ghc-9.7)
+      GHC.Tc.Types (needs flag -package-id ghc-9.7)
+      GHC.Hs.Syn.Type (needs flag -package-id ghc-9.7)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package07e.hs:3:1: error:
-    Could not load module ‘GHC.Hs.Type’
-    It is a member of the hidden package ‘ghc-9.3’.
+package07e.hs:3:1: error: [GHC-00017]
+    Could not load module ‘GHC.Hs.Type’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package07e.hs:4:1: error:
-    Could not load module ‘GHC.Hs.Utils’
-    It is a member of the hidden package ‘ghc-9.3’.
+package07e.hs:4:1: error: [GHC-00017]
+    Could not load module ‘GHC.Hs.Utils’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package07e.hs:5:1: error:
-    Could not load module ‘GHC.Types.Unique.FM’
-    It is a member of the hidden package ‘ghc-9.3’.
+package07e.hs:5:1: error: [GHC-00017]
+    Could not load module ‘GHC.Types.Unique.FM’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/package/package08e.stderr
=====================================
@@ -1,29 +1,29 @@
 
-package08e.hs:2:1: error:
-    Could not find module ‘GHC.Hs.MyTypes’
+package08e.hs:2:1: error: [GHC-00020]
+    Could not find module ‘GHC.Hs.MyTypes’.
     Perhaps you meant
-      GHC.Hs.Type (needs flag -package-id ghc-9.3)
-      GHC.Tc.Types (needs flag -package-id ghc-9.3)
-      GHC.Hs.Syn.Type (needs flag -package-id ghc-9.3)
+      GHC.Hs.Type (needs flag -package-id ghc-9.7)
+      GHC.Tc.Types (needs flag -package-id ghc-9.7)
+      GHC.Hs.Syn.Type (needs flag -package-id ghc-9.7)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package08e.hs:3:1: error:
-    Could not load module ‘GHC.Hs.Type’
-    It is a member of the hidden package ‘ghc-9.3’.
+package08e.hs:3:1: error: [GHC-00017]
+    Could not load module ‘GHC.Hs.Type’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package08e.hs:4:1: error:
-    Could not load module ‘GHC.Hs.Utils’
-    It is a member of the hidden package ‘ghc-9.3’.
+package08e.hs:4:1: error: [GHC-00017]
+    Could not load module ‘GHC.Hs.Utils’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-package08e.hs:5:1: error:
-    Could not load module ‘GHC.Types.Unique.FM’
-    It is a member of the hidden package ‘ghc-9.3’.
+package08e.hs:5:1: error: [GHC-00017]
+    Could not load module ‘GHC.Types.Unique.FM’.
+    It is a member of the hidden package ‘ghc-9.7’.
     You can run ‘:set -package ghc’ to expose it.
     (Note: this unloads all the modules in the current scope.)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/package/package09e.stderr
=====================================
@@ -1,5 +1,5 @@
 
-package09e.hs:2:1: error:
+package09e.hs:2:1: error: [GHC-00022]
     Ambiguous module name ‘M’:
-      it is bound as Data.Set by a package flag
-      it is bound as Data.Map by a package flag
+    it is bound as Data.Set by a package flag
+    it is bound as Data.Map by a package flag


=====================================
testsuite/tests/perf/compiler/parsing001.stderr
=====================================
@@ -1,4 +1,4 @@
 
-parsing001.hs:3:1: error:
-    Could not find module ‘Wibble’
+parsing001.hs:3:1: error: [GHC-00017]
+    Could not find module ‘Wibble’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/plugins/T11244.stderr
=====================================
@@ -1,4 +1,4 @@
-<command line>: Could not load module ‘RuleDefiningPlugin’
+<command line>: Could not load module ‘RuleDefiningPlugin’.
 It is a member of the hidden package ‘rule-defining-plugin-0.1’.
 You can run ‘:set -package rule-defining-plugin’ to expose it.
 (Note: this unloads all the modules in the current scope.)


=====================================
testsuite/tests/plugins/plugins03.stderr
=====================================
@@ -1,2 +1,2 @@
-<command line>: Could not find module ‘Simple.NonExistentPlugin’
+<command line>: Could not find module ‘Simple.NonExistentPlugin’.
 Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/safeHaskell/safeLanguage/SafeLang07.stderr
=====================================
@@ -2,6 +2,6 @@
 SafeLang07.hs:2:14: warning:
     -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
 
-SafeLang07.hs:15:1: error:
-    Could not find module ‘SafeLang07_A’
+SafeLang07.hs:15:1: error: [GHC-00017]
+    Could not find module ‘SafeLang07_A’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.


=====================================
testsuite/tests/th/T10279.stderr
=====================================
@@ -1,6 +1,6 @@
 
-T10279.hs:10:9: error: [GHC-52243]
-    • Failed to load interface for ‘A’
+T10279.hs:10:9: error: [GHC-00023]
+    • Failed to load interface for ‘A’:
       no unit id matching ‘rts-1.0.2’ was found
       (This unit ID looks like the source package ID;
        the real unit ID is ‘rts’)


=====================================
testsuite/tests/typecheck/should_fail/tcfail082.stderr
=====================================
@@ -1,12 +1,12 @@
 
-tcfail082.hs:2:1: error:
-    Could not find module ‘Data82’
+tcfail082.hs:2:1: error: [GHC-00017]
+    Could not find module ‘Data82’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-tcfail082.hs:3:1: error:
-    Could not find module ‘Inst82_1’
+tcfail082.hs:3:1: error: [GHC-00017]
+    Could not find module ‘Inst82_1’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
-tcfail082.hs:4:1: error:
-    Could not find module ‘Inst82_2’
+tcfail082.hs:4:1: error: [GHC-00017]
+    Could not find module ‘Inst82_2’.
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d789fd0d265513ec930c72645d1e26e99206b867

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d789fd0d265513ec930c72645d1e26e99206b867
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230316/0e855578/attachment-0001.html>


More information about the ghc-commits mailing list