[GHC] #13064: Incorrect redudant imports warning
GHC
ghc-devs at haskell.org
Thu Aug 23 10:01:14 UTC 2018
#13064: Incorrect redudant imports warning
-------------------------------------+-------------------------------------
Reporter: phadej | Owner: (none)
Type: bug | Status: new
Priority: low | Milestone: 8.8.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: #15393 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by phadej):
Replying to [comment:25 bgamari]:
> **Replying to comment:24:**
>
> I suppose this is a possibility, although it seems to be me that we
should rather try to introduce a mechanism to allow the user to state
explicitly what they mean. That is: the import is known to be redundant
but added for compatibility's sake. This could either be a general
mechanism (e.g. wiki:Design/LocalWarningPragmas) or something more
specifically designed to address import redundancy. (e.g. a `{-# USED #-}`
pragma which could be attached to an import to silence the redundancy
checker),
We shouldn't need to go through GHC-proposal process for a bug fix. We
should fix a bug, and then the interested people will either polish
https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/RelaxedUnusedImports
into a proposal, or propose some other way around (e.g. more granular
warning toggles, then per-module).
I'm for sure **implicitly** depend on this bug behavior for warning free
builds, but I don't like it. For example: the tool `weeder` (to purge
dependencies) isn't as useful now, as one might have an import which isn't
necessary, but it retains the dependency.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13064#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list