Fix grouping for pattern synonyms
Fix grouping for pattern synonyms

When grouping pattern synonyms in the desugarer, to find when a single
match will work for the whole group, we use `Match.sameGroup`.  But this
function was declaring two pattern-synonym matches equal to often.
Result: Lint errors and broken semantics.

The fix is easy.  See Note [Pattern synonym groups].

Re-do typechecking for pattern synonym signatures

Test Plan: Validate

Reviewers: austin

Subscribers: thomie, mpickering, simonpj

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

vTurbine/ghc,sdiehl/ghc,oldmanmike/ghc,sgillespie/ghc,nushio3/ghc,gridaphobe/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,mettekou/ghc,tjakway/ghcjvm,GaloisInc/halvm-ghc,ezyang/ghc,nushio3/ghc,olsner/ghc,shlevy/ghc,snoyberg/ghc,tjakway/ghcjvm,vikraman/ghc,mettekou/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,tjakway/ghcjvm,sdiehl/ghc,nushio3/ghc,tjakway/ghcjvm,sdiehl/ghc,gridaphobe/ghc,sgillespie/ghc,nushio3/ghc,snoyberg/ghc,mcschroeder/ghc,vTurbine/ghc,ezyang/ghc,olsner/ghc,sdiehl/ghc,sdiehl/ghc,mettekou/ghc,ezyang/ghc,oldmanmike/ghc,gridaphobe/ghc,oldmanmike/ghc,snoyberg/ghc,sgillespie/ghc,ezyang/ghc,shlevy/ghc,sdiehl/ghc,gridaphobe/ghc,sgillespie/ghc,olsner/ghc,snoyberg/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,GaloisInc/halvm-ghc,mettekou/ghc,vTurbine/ghc,shlevy/ghc,mcschroeder/ghc,mcschroeder/ghc,gridaphobe/ghc,olsner/ghc,tjakway/ghcjvm,oldmanmike/ghc,sgillespie/ghc,oldmanmike/ghc,ezyang/ghc,olsner/ghc,vikraman/ghc,GaloisInc/halvm-ghc,mcschroeder/ghc,vikraman/ghc,gridaphobe/ghc,mettekou/ghc,GaloisInc/halvm-ghc,shlevy/ghc,gridaphobe/ghc,shlevy/ghc,mcschroeder/ghc,ezyang/ghc,olsner/ghc,mettekou/ghc,sdiehl/ghc,sgillespie/ghc,oldmanmike/ghc,vTurbine/ghc,shlevy/ghc,vikraman/ghc,vikraman/ghc,vTurbine/ghc,vTurbine/ghc,tjakway/ghcjvm,sgillespie/ghc,olsner/ghc,nushio3/ghc,shlevy/ghc,oldmanmike/ghc,ezyang/ghc,mcschroeder/ghc,mcschroeder/ghc,vikraman/ghc,nushio3/ghc,snoyberg/ghc,tjakway/ghcjvm,mettekou/ghc,vikraman/ghc,nushio3/ghc