Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,869
    • Issues 4,869
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 456
    • Merge requests 456
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #10117
Closed
Open
Created Feb 26, 2015 by Simon Peyton Jones@simonpjDeveloper

Change the scheme for reporting redundant imports

The current scheme for reporting redundant imports is given on the unusedimportspage.

The 7.10 migration page describes a hack to avoid redundant-import warnings during migration, without using CPP. The hack works for

  module Foo (Int, Word, Monoid(..)) where

  import Data.Monoid
  import Data.Word
  import Prelude

(the hack is putting import Prelude at the bottom). To understand why, read the specification on the unusedimportspage.

But it fails for

  module Foo (Int, Word, Monoid(..)) where

  import Data.Monoid (Monoid(..))
  import Data.Word (Word)
  import Prelude

because the specification treats itemised imports like import Data.Word(Word) differently to "import all" imports.

The question: is there alternative spec (vs the one on the unusedimportspage) that would support the behaviour desired here, without having other undesirable consequences?

Trac metadata
Trac field Value
Version 7.8.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking