Skip to content
  • Simon Peyton Jones's avatar
    Fix scoping of type variables in instances · 0050aff2
    Simon Peyton Jones authored
    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.
    0050aff2