[GHC] #12784: Typechecker regression in GHC 8.0.2 involving DefaultSignatures

GHC ghc-devs at haskell.org
Tue Nov 29 15:09:31 UTC 2016


#12784: Typechecker regression in GHC 8.0.2 involving DefaultSignatures
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.2
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2682
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Simon, that sounds sensible to me. I was quite shocked myself to learn how
 many `DefaultSignatures` validity checks are shunted off until the site of
 instance declarations instead of the class declaration, and moreover, that
 there is no requirement that the normal type signature and the default
 type signature must be the same (modulo context differences).

 Of course, that all sounds wonderful in my head, but if tracking down
 these kinds of regressions have taught me anything, it's that fiddling
 with `DefaultSignatures` further is inevitably bound to break more code in
 the wild. I don't say that to discourage you from pursuing this change
 (which I think is a net positive), but be aware that there are probably
 Haskell programs that are abusing `DefaultSignatures` in wildly creative
 ways, so we'll likely step on their toes in some way.

 '''tl;dr''' If we change the typechecking rules for `DefaultSignatures`
 further, we should carefully consider whether it's worth introducing in a
 minor release :)

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


More information about the ghc-tickets mailing list