GHC generates warnings when there are implicit imports (see below). The goal is to replace these with explicit imports. Is there an automated way to generated the list (instead of manually finding it in code)?
/Users/srid/code/slownews/backend/src/SlowNews/Main.hs:10:1: warning: [-Wmissing-import-lists]
The module ‘Control.Exception’ does not have an explicit import list
|
10 | import Control.Exception
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/srid/code/slownews/backend/src/SlowNews/Main.hs:13:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.IO.Class’ does not have an explicit import list
|
13 | import Control.Monad.IO.Class
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GHC has a -ddump-minimal-imports
flag which will do the trick.
There's an open pull request un importify
tool which I'm working on. After this is done you will be able to convert implicit imports to explicit automatically:
https://github.com/serokell/importify/pull/82
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With