Fix #15828, from `More explicit foralls`

Authored by mayac on Nov 29 2018, 5:42 PM.

Description

Fix Trac #15828, from More explicit foralls

Summary:
Fix a bug in commit 12eeb9 which permits the following:

class C a where
  type T a b
instance C (Maybe a) where
  type forall a b. T (Maybe a) b = b

where instead, the user should write:

instance C (Maybe a) where
  type forall b. T (Maybe a) b = b

Update the users guide to discuss scoping of type variables in
explicit foralls in type family instances.

Test Plan: validate

Reviewers: bgamari, goldfire, monoidal

Reviewed By: goldfire

Subscribers: monoidal, rwbarton, carter

GHC Trac Issues: Trac #15828

Differential Revision: https://phabricator.haskell.org/D5283

Details

Committed
RyanGlScottNov 29 2018, 5:44 PM
Reviewer
goldfire
Differential Revision
D5283: Fix #15828, from `More explicit foralls`
Parents
rGHC2257a86daa72: Taming the Kind Inference Monster
Branches
Unknown
Tags
Unknown