I’d like to get the behavior of -Xmissing-import-lists
but exclude record field wildcard imports.
Example: $ ghc -XNoImplicitPrelude -Wmissing-import-lists {a,b,c}.hs
a.hs:
import Prelude (putStrLn, Bool(..))
main = putStrLn "Hi"
b.hs:
import Prelude (putStrLn)
main = putStrLn "Hi"
c.hs:
import Prelude
main = putStrLn "Hi"
Expect:
- a.hs and b.hs no warning.
- c warning.
Alternatively, I’d be interested if there is some way to enable NoFieldSelectors
where it would be sufficient to import only the record and still be able to refer to its field via OverloadedRecordDot
.
6