Missing Export List [GHC-85401]
Flag: -Wmissing-export-lists
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.
Examples
Export list is missing in module declaration
Warning
Example1.hs:1:1: warning: [-Wmissing-export-lists]
The export item ‘module Example1’ is missing an export list
|
1 | {-# OPTIONS_GHC -Wmissing-export-lists #-}
| ^Example1.hs
Before
{-# OPTIONS_GHC -Wmissing-export-lists #-}
module Example1 where
hello :: String -> String
hello s = "Hello " <> s
After
{-# OPTIONS_GHC -Wmissing-export-lists #-}
module Example1 (hello) where
hello :: String -> String
hello s = "Hello " <> s