
#11451: Inconsistent warnings for unused binders in type and instance declarations -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 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): Phab:D1825 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I've thought of a simpler spec still * If a type variable bound by an explicit, user-written `forall` is unused, we warn. * But it it is bound only by a type pattern (in a class or type instance declaration), we don't warn even if it is otherwise unused. That's nice and precise. I'm agnostic about what flags control this. I suppose you might want to say A. No warnings at all B. Warn about unused `forall`-bound variables C. Warn about those and unused pattern-bound variables (maybe) It's not clear that implementing C is worth it. (Yes that's what we currently have, more or less, but inconsistently.) I don't have a strong opinion about what flags should switch between A and B, or A/B/C. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11451#comment:27 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler