[GHC] #11339: Possible type-checker regression in GHC 8.0

GHC ghc-devs at haskell.org
Wed Jan 6 03:29:41 UTC 2016


#11339: Possible type-checker regression in GHC 8.0
-------------------------------------+-------------------------------------
        Reporter:  hvr               |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.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:                    |
-------------------------------------+-------------------------------------
Changes (by goldfire):

 * keywords:  TypeInType =>


Comment:

 On further thought, (5) from comment:2 is a bug, too.

 In any case, this one isn't my fault. I'm responsible for point (1) in
 comment:2, but that's an improvement (the file submitted ought not to be
 accepted, because it runs afoul of the monomorphism restriction).

 On the other hand, points (2) and (5), the real bugs, are around in 7.10.
 With 7.10.2,

 {{{
 module Mono where

 foo :: Show a => a -> String
 (foo) = show
 }}}

 fails unless you enable `-XNoMonomorphismRestriction`. And

 {{{
 module Mono where

 foo :: _
 (foo) = id
 }}}

 succeeds, with no warnings.

 I conjecture that both problems are related to the fact that
 `decideGeneralisationPlan` always infers for pattern bindings. But I
 haven't looked into it more than that.

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


More information about the ghc-tickets mailing list