[GHC] #13524: GHC does not preserve order of forall'd vars with TypeApplications

GHC ghc-devs at haskell.org
Tue Apr 4 22:07:05 UTC 2017


#13524: GHC does not preserve order of forall'd vars with TypeApplications
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:                    |             Keywords:
                                     |  TypeApplications
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Hmm. When the user gives a partial type signature, a whole new code path
 is used when checking the function. It seems this code path does not
 respect the order of specified type variables. @niteria's patch likely
 just exposed the underlying fragility; I don't think investigating that
 patch will yield any tasty fruit.

 I'm afraid I'm unable to address this right now, unfortunately. We could
 advertise this as an infelicity (I'm fairly confident the problem will
 happen only with a partial type signature). Perhaps even better, we could
 label variables in partial type signatures as "inferred", meaning that GHC
 will prevent them from being available for type application.

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


More information about the ghc-tickets mailing list