Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module ExportedModNotImported (module Data.List) where

import Data.List
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module ExportedModNotImported (module Data.List) where
14 changes: 14 additions & 0 deletions message-index/messages/GHC-90973/exportedModNotImported/index.md
Original file line number Diff line number Diff line change
@@ -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.
25 changes: 25 additions & 0 deletions message-index/messages/GHC-90973/index.md
Original file line number Diff line number Diff line change
@@ -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 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

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 <MISSING-MODULE>` export from the export list