Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for GHC-85401 (missing export lists) #520

Merged
merged 5 commits into from
Feb 2, 2025
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
5 changes: 5 additions & 0 deletions message-index/messages/GHC-85401/example1/after/Example1.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# OPTIONS_GHC -Wmissing-export-lists #-}
module Example1 (hello) where

hello :: String -> String
hello s = "Hello " <> s
5 changes: 5 additions & 0 deletions message-index/messages/GHC-85401/example1/before/Example1.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# OPTIONS_GHC -Wmissing-export-lists #-}
module Example1 where

hello :: String -> String
hello s = "Hello " <> s
13 changes: 13 additions & 0 deletions message-index/messages/GHC-85401/example1/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Export list is missing in module declaration
---

## Warning

```haskell
Example1.hs:1:1: warning: [-Wmissing-export-lists]
The export item ‘module Example1’ is missing an export list
|
1 | {-# OPTIONS_GHC -Wmissing-export-lists #-}
| ^
```
9 changes: 9 additions & 0 deletions message-index/messages/GHC-85401/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Missing Export List
summary: The module export list is missing
severity: warning
flag: -Wmissing-export-lists
introduced: 9.6.1
---

If enabled by `-Wmissing-export-lists` or `-Weverything`, GHC issues a warning when the `module` declaration does not contain an export list. When an export list is missing, all definitions in the module are exported.