
#12557: Regression in type inference with ImpredicativeTypes -------------------------------------+------------------------------------- Reporter: slindley | Owner: Type: bug | Status: closed Priority: low | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: Resolution: invalid | ImpredicativeTypes 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: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => invalid Comment: This is a bug in 7.10. Basically, a lambda-bound variable like `\g` above can never get a higher rank type (one involving a forall), unless there is an enclosing type signature so that it's clear ''at the binding site'' what its type should be. I don't know any way to fix this. Do not rely on `-XImpredicativeTypes`; it is an incomplete, inconsistent and generally broken feature that I should probably remove. I just don't know how to do a better job, sorry! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12557#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler