Skip to content
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.