[GHC] #12531: Holes should be representation-polymorphic

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


#12531: Holes should be representation-polymorphic
-------------------------------------+-------------------------------------
        Reporter:  mniip             |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 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/12531#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list