Skip to content

Commit 300cae4

Browse files
authored
Add documentation for GHC-85401 (missing export lists) (#520)
1 parent c1e66db commit 300cae4

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{-# OPTIONS_GHC -Wmissing-export-lists #-}
2+
module Example1 (hello) where
3+
4+
hello :: String -> String
5+
hello s = "Hello " <> s
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{-# OPTIONS_GHC -Wmissing-export-lists #-}
2+
module Example1 where
3+
4+
hello :: String -> String
5+
hello s = "Hello " <> s
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Export list is missing in module declaration
3+
---
4+
5+
## Warning
6+
7+
```haskell
8+
Example1.hs:1:1: warning: [-Wmissing-export-lists]
9+
The export item module Example1 is missing an export list
10+
|
11+
1 | {-# OPTIONS_GHC -Wmissing-export-lists #-}
12+
| ^
13+
```
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Missing Export List
3+
summary: The module export list is missing
4+
severity: warning
5+
flag: -Wmissing-export-lists
6+
introduced: 9.6.1
7+
---
8+
9+
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.

0 commit comments

Comments
 (0)