Skip to content

Add GHC-38856 - UnusedImportSome #493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions message-index/messages/GHC-38856/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: A file that doesn't use everything imported from a given module
summary: One or more explicit imports are unused.
severity: warning
flag: -Wunused-imports
introduced: 9.6.1
---

One or more explicit imports are unused.

This occurs when an import statement explicitly specifies a mixture of used and unused imports.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module UnusedImport where

import Data.Char (isLower)

a :: Bool
a = isLower 'c'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module UnusedImport where

import Data.Char (isDigit, isLower)

a :: Bool
a = isLower 'c'
5 changes: 5 additions & 0 deletions message-index/messages/GHC-38856/unused-import/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: 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.