[GHC] #11451: Inconsistent warnings for unused binders

GHC ghc-devs at haskell.org
Mon Jan 18 10:22:30 UTC 2016


#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 Lemming):

 I think that if a type variable is mentioned in an instance head this
 should count as usage. Then the according type patterns in associated
 types should be literally equal and should not get a warning. Thus I go
 with your second thought.
 Sure, this is somehow inconsistent with the value level, however, warning
 about unused type variables in this cases means I have to rewrite lots of
 code, even Haskell 98 code, to get rid of warnings and I guess, that
 `instance C (Maybe _)` is not even valid Haskell 98.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11451#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list