[GHC] #13512: GHC incorrectly warns that a variable used in a type application is unused

GHC ghc-devs at haskell.org
Tue Apr 4 08:57:00 UTC 2017


#13512: GHC incorrectly warns that a variable used in a type application is unused
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |             Keywords:
      Resolution:                    |  TypeApplications, newcomer
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Ugh, yes, quite right.  To fix this the renamer needs to propagate usages
 of type variables in a binding to their binding sites in the corresponding
 type signature.  That is somewhat fiddly,and would require some
 refactoring in `RnBinds.rnValBindsRHS`.

 Volunteers welcome!

 Simon

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


More information about the ghc-tickets mailing list