Skip to content
  • mayac's avatar
    Fix #15828, from `More explicit foralls` · fe57a5ba
    mayac authored and Ryan Scott's avatar Ryan Scott committed
    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: #15828
    
    Differential Revision: https://phabricator.haskell.org/D5283
    fe57a5ba