From 6bbbbd3fcdd0799cd08b0bd0714bae8d32c2f4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hr=C4=8Dek?= Date: Thu, 6 Jun 2024 17:12:15 +0200 Subject: [PATCH 1/2] Document GHC-90973 --- .../after/ExportedModNotImported.hs | 3 +++ .../before/ExportedModNotImported.hs | 1 + .../GHC-90973/exportedModNotImported/index.md | 14 +++++++++++ message-index/messages/GHC-90973/index.md | 25 +++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 message-index/messages/GHC-90973/exportedModNotImported/after/ExportedModNotImported.hs create mode 100644 message-index/messages/GHC-90973/exportedModNotImported/before/ExportedModNotImported.hs create mode 100644 message-index/messages/GHC-90973/exportedModNotImported/index.md create mode 100644 message-index/messages/GHC-90973/index.md diff --git a/message-index/messages/GHC-90973/exportedModNotImported/after/ExportedModNotImported.hs b/message-index/messages/GHC-90973/exportedModNotImported/after/ExportedModNotImported.hs new file mode 100644 index 00000000..f18db0d7 --- /dev/null +++ b/message-index/messages/GHC-90973/exportedModNotImported/after/ExportedModNotImported.hs @@ -0,0 +1,3 @@ +module ExportedModNotImported (module Data.List) where + +import Data.List diff --git a/message-index/messages/GHC-90973/exportedModNotImported/before/ExportedModNotImported.hs b/message-index/messages/GHC-90973/exportedModNotImported/before/ExportedModNotImported.hs new file mode 100644 index 00000000..b8cfd83d --- /dev/null +++ b/message-index/messages/GHC-90973/exportedModNotImported/before/ExportedModNotImported.hs @@ -0,0 +1 @@ +module ExportedModNotImported (module Data.List) where diff --git a/message-index/messages/GHC-90973/exportedModNotImported/index.md b/message-index/messages/GHC-90973/exportedModNotImported/index.md new file mode 100644 index 00000000..97d82ca6 --- /dev/null +++ b/message-index/messages/GHC-90973/exportedModNotImported/index.md @@ -0,0 +1,14 @@ +--- +title: Exporting module which has not been imported +--- + +```haskell +ExportedModNotImported.hs:1:32: error: + The export item ‘module Data.List’ is not imported + | +1 | module ExportedModNotImported (module Data.List) where + | +``` + +We're trying to reexport a module which has not been imported. +In this case we fix it by adding the missing import statement. diff --git a/message-index/messages/GHC-90973/index.md b/message-index/messages/GHC-90973/index.md new file mode 100644 index 00000000..91a3e270 --- /dev/null +++ b/message-index/messages/GHC-90973/index.md @@ -0,0 +1,25 @@ +--- +title: Exported module not imported +summary: Export list contains a module that is not imported +severity: error +introduced: 9.6.1 +--- + +An *Export List* of a Haskell module identifies the entities (functions, types, etc.) to be exported by a module declaration. +The syntax for export lists is describe in the [section 5.2](https://www.haskell.org/onlinereport/modules.html) of the **Haskell 98 Language and Libraries** report. Apart from exporting individual functions and data types, the specification also allows you to re-export entire modules as in this example: + +```haskell +module My.List.Reexport (module Data.List) where + +import Data.List + +... +``` + +This tells GHC to include all the symbols exported by the module `Data.List` to also be exported by `My.List.Reexport` module. + +The error message `GHC-90973` occurs when module's export list contains a module export of a module, which hasn't been imported. + +The usual way to fix it is to either: +1. add the missing module import +2. remove the `module ` export from the export list From 390f683530d01e9616f382b105af3efd68fecaca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CB=8Cbod=CA=B2=C9=AA=CB=88=C9=A1r=CA=B2im?= Date: Sun, 2 Feb 2025 18:56:18 +0000 Subject: [PATCH 2/2] Update message-index/messages/GHC-90973/index.md --- message-index/messages/GHC-90973/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message-index/messages/GHC-90973/index.md b/message-index/messages/GHC-90973/index.md index 91a3e270..0762b9f3 100644 --- a/message-index/messages/GHC-90973/index.md +++ b/message-index/messages/GHC-90973/index.md @@ -6,7 +6,7 @@ introduced: 9.6.1 --- An *Export List* of a Haskell module identifies the entities (functions, types, etc.) to be exported by a module declaration. -The syntax for export lists is describe in the [section 5.2](https://www.haskell.org/onlinereport/modules.html) of the **Haskell 98 Language and Libraries** report. Apart from exporting individual functions and data types, the specification also allows you to re-export entire modules as in this example: +The syntax for export lists is described in the [section 5.2](https://www.haskell.org/onlinereport/modules.html) of the **Haskell 98 Language and Libraries** report. Apart from exporting individual functions and data types, the specification also allows you to re-export entire modules as in this example: ```haskell module My.List.Reexport (module Data.List) where