[GHC] #12652: Type checker no longer accepting code using function composition and rank-n types

GHC ghc-devs at haskell.org
Mon Oct 3 00:49:21 UTC 2016


#12652: Type checker no longer accepting code using function composition and rank-n
types
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:  simonpj
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      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 goldfire):

 The new behavior looks correct to me. `g`'s type expands to `Int -> (?x ::
 Int) => IO ()`, and it's critical that the `(?x :: Int)` bit does not get
 instantiated for this to type-check. Accordingly, the type parameters to
 `(.)` would have to be qualified types for this to work, so I say this is
 an improvement in behavior.

 Of course, it might just be time to extend the `($)` hack to work with
 `(.)`, too. Until we do so, though, we should reject the original program.

 Simon, what do you think?

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


More information about the ghc-tickets mailing list