From 9ec47c94f38bdead00bf5f1e6134856894f661b4 Mon Sep 17 00:00:00 2001 From: Pekka Kaitaniemi Date: Sat, 8 Jun 2024 17:05:50 +0300 Subject: [PATCH 1/5] Add documentation for GHC-85401 (missing export lists) --- .../messages/GHC-85401/example1/after/Example1.hs | 5 +++++ .../messages/GHC-85401/example1/before/Example1.hs | 5 +++++ message-index/messages/GHC-85401/example1/index.md | 13 +++++++++++++ message-index/messages/GHC-85401/index.md | 9 +++++++++ 4 files changed, 32 insertions(+) create mode 100644 message-index/messages/GHC-85401/example1/after/Example1.hs create mode 100644 message-index/messages/GHC-85401/example1/before/Example1.hs create mode 100644 message-index/messages/GHC-85401/example1/index.md create mode 100644 message-index/messages/GHC-85401/index.md diff --git a/message-index/messages/GHC-85401/example1/after/Example1.hs b/message-index/messages/GHC-85401/example1/after/Example1.hs new file mode 100644 index 00000000..4ced17c0 --- /dev/null +++ b/message-index/messages/GHC-85401/example1/after/Example1.hs @@ -0,0 +1,5 @@ +{-# OPTIONS_GHC -fwarn-missing-export-lists #-} +module Example1 (hello) where + +hello :: String -> String +hello s = "Hello " <> s diff --git a/message-index/messages/GHC-85401/example1/before/Example1.hs b/message-index/messages/GHC-85401/example1/before/Example1.hs new file mode 100644 index 00000000..46aa17a2 --- /dev/null +++ b/message-index/messages/GHC-85401/example1/before/Example1.hs @@ -0,0 +1,5 @@ +{-# OPTIONS_GHC -fwarn-missing-export-lists #-} +module Example1 where + +hello :: String -> String +hello s = "Hello " <> s diff --git a/message-index/messages/GHC-85401/example1/index.md b/message-index/messages/GHC-85401/example1/index.md new file mode 100644 index 00000000..f01320b0 --- /dev/null +++ b/message-index/messages/GHC-85401/example1/index.md @@ -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 -fwarn-missing-export-lists #-} + | ^ +``` diff --git a/message-index/messages/GHC-85401/index.md b/message-index/messages/GHC-85401/index.md new file mode 100644 index 00000000..af9ae82b --- /dev/null +++ b/message-index/messages/GHC-85401/index.md @@ -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 +--- + +GHC issues a warning if he module declaration does not contain an export list. When an export list is missing, all definitions in the module are exported. From a528ba99bca4cf4b4238d60b8487815b52c27d34 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 21:50:09 +0000 Subject: [PATCH 2/5] Update message-index/messages/GHC-85401/index.md --- message-index/messages/GHC-85401/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message-index/messages/GHC-85401/index.md b/message-index/messages/GHC-85401/index.md index af9ae82b..cf395e84 100644 --- a/message-index/messages/GHC-85401/index.md +++ b/message-index/messages/GHC-85401/index.md @@ -6,4 +6,4 @@ flag: -Wmissing-export-lists introduced: 9.6.1 --- -GHC issues a warning if he module declaration does not contain an export list. When an export list is missing, all definitions in the module are exported. +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. From b88c1c1fc94bc1f9522b2263d5d39e435409c4e7 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 21:50:15 +0000 Subject: [PATCH 3/5] Update message-index/messages/GHC-85401/example1/index.md --- message-index/messages/GHC-85401/example1/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message-index/messages/GHC-85401/example1/index.md b/message-index/messages/GHC-85401/example1/index.md index f01320b0..b90e1ed0 100644 --- a/message-index/messages/GHC-85401/example1/index.md +++ b/message-index/messages/GHC-85401/example1/index.md @@ -8,6 +8,6 @@ title: Export list is missing in module declaration Example1.hs:1:1: warning: [-Wmissing-export-lists] The export item ‘module Example1’ is missing an export list | -1 | {-# OPTIONS_GHC -fwarn-missing-export-lists #-} +1 | {-# OPTIONS_GHC -Wmissing-export-lists #-} | ^ ``` From 0353512f6e828baef386e788232d9b9347c9e5fd 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 21:50:20 +0000 Subject: [PATCH 4/5] Update message-index/messages/GHC-85401/example1/before/Example1.hs --- message-index/messages/GHC-85401/example1/before/Example1.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message-index/messages/GHC-85401/example1/before/Example1.hs b/message-index/messages/GHC-85401/example1/before/Example1.hs index 46aa17a2..54d0b2a4 100644 --- a/message-index/messages/GHC-85401/example1/before/Example1.hs +++ b/message-index/messages/GHC-85401/example1/before/Example1.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fwarn-missing-export-lists #-} +{-# OPTIONS_GHC -Wmissing-export-lists #-} module Example1 where hello :: String -> String From 30f90313882e0fd9a9e1d325a342fb9a5dfe12b1 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 21:50:26 +0000 Subject: [PATCH 5/5] Update message-index/messages/GHC-85401/example1/after/Example1.hs --- message-index/messages/GHC-85401/example1/after/Example1.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message-index/messages/GHC-85401/example1/after/Example1.hs b/message-index/messages/GHC-85401/example1/after/Example1.hs index 4ced17c0..8ad6480e 100644 --- a/message-index/messages/GHC-85401/example1/after/Example1.hs +++ b/message-index/messages/GHC-85401/example1/after/Example1.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fwarn-missing-export-lists #-} +{-# OPTIONS_GHC -Wmissing-export-lists #-} module Example1 (hello) where hello :: String -> String