Skip to content

Commit 58fc67f

Browse files
414owenBodigrim
authored andcommitted
chore: Add GHC-38856 - UnusedImportSome
1 parent 3154714 commit 58fc67f

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: A file that doesn't use everything imported from a given module
3+
summary: One or more explicit imports are unused.
4+
severity: warning
5+
flag: -Wunused-imports
6+
introduced: 9.6.1
7+
---
8+
9+
One or more explicit imports are unused.
10+
11+
This occurs when an import statement explicitly specifies a mixture of used and unused imports.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module UnusedImport where
2+
3+
import Data.Char (isLower)
4+
5+
a :: Bool
6+
a = isLower 'c'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module UnusedImport where
2+
3+
import Data.Char (isDigit, isLower)
4+
5+
a :: Bool
6+
a = isLower 'c'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: The import of ‘isDigit’ from module ‘Data.Char’ is redundant
3+
---
4+
5+
In this example, 'isDigit' isn't used in the module. To fix it, you can remove the import.

0 commit comments

Comments
 (0)