Skip to content
  • Ryan Scott's avatar
    Fix #14114 by checking for duplicate vars on pattern synonym RHSes · a89bb806
    Ryan Scott authored
    Summary:
    Because we weren't checking for duplicate variables on the right-hand
    sides of pattern synonyms, bogus definitions like this one passed the renamer:
    
    ```lang=haskell
    pattern Foo a <- (a,a)
    ```
    
    Luckily, the fix is simple.
    
    Test Plan: make test TEST=T14114
    
    Reviewers: mpickering, austin, bgamari, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, rwbarton, thomie
    
    GHC Trac Issues: #14114
    
    Differential Revision: https://phabricator.haskell.org/D3866
    a89bb806