A file that doesn't use everything imported from a given module [GHC-38856]

Flag: -Wunused-imports
Enabled by: -Wextra

One or more explicit imports are unused.

This occurs when an import statement explicitly specifies a mixture of used and unused imports.

Examples

The import of ‘isDigit’ from module ‘Data.Char’ is redundant

In this example, ‘isDigit’ isn’t used in the module. To fix it, you can remove the import.

UnusedImport.hs
Before
module UnusedImport where

import Data.Char (isDigit, isLower)

a :: Bool
a = isLower 'c'
After
module UnusedImport where

import Data.Char (isLower)

a :: Bool
a = isLower 'c'