[GHC] #12533: Internal error using redundant forall with default signature

GHC ghc-devs at haskell.org
Fri Aug 26 16:40:40 UTC 2016


#12533: Internal error using redundant forall with default signature
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.2
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Compile-time      |            Test Case:
  crash                              |  rename/should_compile/T12533
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * testcase:   => rename/should_compile/T12533


Comment:

 In [changeset:"0050aff22ba04baca732bf5124002417ab667f8a/ghc"
 0050aff2/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="0050aff22ba04baca732bf5124002417ab667f8a"
 Fix scoping of type variables in instances

 This fixes Trac #12531:

    class Foo x where
      foo :: forall a . x a -> x a
      default foo :: forall b . x b -> x b
      foo x = go
        where go :: x b
              go = undefined

 We want 'b' to scope over the code for 'foo', but we were
 using 'a' instead.
 }}}

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


More information about the ghc-tickets mailing list