Treat duplicate pattern synonym signatures as an error
authorSeraphime Kirkovski <kirkseraph@gmail.com>
Fri, 1 Jul 2016 12:30:10 +0000 (14:30 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 4 Jul 2016 21:35:25 +0000 (23:35 +0200)
commit2a3af15270d1c04745b1c42e61bf4d5f6dbc8ad5
tree038d795124ef0d5587e93205d61fc66539bffaf1
parentafec447cde1f97438bbc5bf7a31000e948c721eb
Treat duplicate pattern synonym signatures as an error

Fixes issue T12165 by banning duplicate pattern synonyms
signatures. This seems to me the best solution because:

   1) it is coherent with the way we treat other duplicate signatures

   2) the typechecker currently doesn't try to apply a second
       signature to a pattern to see if it matches, probably because
       it assumes there is no more than one signature per object.

Test Plan: ./validate

Reviewers: goldfire, austin, mpickering, bgamari

Reviewed By: mpickering, bgamari

Subscribers: mpickering, thomie

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

GHC Trac Issues: #12165
compiler/rename/RnBinds.hs
testsuite/tests/patsyn/should_fail/T12165.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/T12165.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/all.T