
#11451: Inconsistent warnings for unused binders -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ekmett):
Now, can you give me an example where that would be annoying? Mabye you are right, but let's see.
Let's look at what happens to a real instance list for a data type that I have open on my screen, the haddocks would then show the following instances and class associated types. {{{#!hs Category * (Indexed _i) (~) * i j => Indexable i (Indexed j) Arrow (Indexed _i) ArrowChoice (Indexed _i) ArrowApply (Indexed _i) ArrowLoop (Indexed _i) Representable (Indexed _i) Corepresentable (Indexed _i) Choice (Indexed _i) Closed (Indexed _i) Strong (Indexed _i) Costrong (Indexed _i) Profunctor (Indexed _i) Conjoined (Indexed _i) Bizarre (Indexed Int) Mafic Sieve (Indexed i) ((->) i) Cosieve (Indexed i) ((,) i) Sellable (Indexed i) (Molten i) Bizarre (Indexed i) (Molten i) Monad (Indexed _i _a) Functor (Indexed _i _a) MonadFix (Indexed _i _a) Applicative (Indexed _i _a) Apply (Indexed _i _a) Bind (Indexed _i _a) type Rep (Indexed i) = (->) i type Corep (Indexed i) = (,) i }}} It seems to me the vast majority of instances I have lying around would get almost all of their arguments mangled. Using that as an entirely unscientific survey, 19/27 or ~70% of those instances would have to have their code changed, to get uglier haddocks. Ramped up to cut across the ~10000 instances in my active maintenance directory instead of the 27 in this single source file, that would be annoying. =/ ''Allowing'' the use of _'s in those positions seems perfectly fine to me, but requiring it would create tension between being able to provide clean- looking haddocks and avoiding this warning, or doing something cheesy like writing unnecessary, brittle, `InstanceSigs`. Ultimately, no user of `MonadState` cares about the fact that `s` isn't used in the body of {{{#!hs instance MonadReader r m => MonadReader r (StateT _s m) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11451#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler