GHC should warn about redundant import of a type name also if one of its record selectors is imported
Sorry, I have another corner case for a redundant import warning:
module Main where import Control.Monad.Trans.Writer (WriterT, runWriterT) main :: IO () main = undefined runWriterT
This module will not provoke a warning, although the import of WriterT can be omitted. I assume this is because runWriterT is a record selector of WriterT and could (or should?) be imported as:
import Control.Monad.Trans.Writer (WriterT(runWriterT))
Since I used runWriterT like a regular function I did not care about its record selector feature.