Fix scoping of type variables in instances

Authored by simonpj on Aug 26 2016, 11:32 AM.

Description

Fix scoping of type variables in instances

This fixes Trac 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.

Details

Committed
simonpjAug 26 2016, 11:35 AM
Parents
rGHCa60ea709c2b5: Move import to avoid warning
Branches
Unknown
Tags
Unknown
Build Status
Buildable 10798
Build 12851: [GHC] Linux/amd64: Continuous Integration