Fix panic when using pattern synonyms with DisambiguateRecordFields
authorAdam Gundry <adam@well-typed.com>
Tue, 29 Dec 2015 12:42:32 +0000 (13:42 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 29 Dec 2015 13:13:34 +0000 (14:13 +0100)
commit4f69203dd7892d3640e871c5914b7ee2be5f5dff
treedd83fa4fb9bc601e183135d16be64e851723e2e3
parentaf92ef3eb9e70e59dfdc81cdb88f527c2eb82399
Fix panic when using pattern synonyms with DisambiguateRecordFields

This fixes a `find_tycon` panic when constructing a record pattern
synonym when `DisambiguateRecordFields` (turned on by `RecordWildCards`)
is enabled.  The handling of record wild cards in such constructions
isn't completely satisfactory, but doing better will require the
`Parent` type to be more informative, as I'll explain on #11228.

Test Plan: New test patsyn/should_compile/T11283.hs

Reviewers: mpickering, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

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

GHC Trac Issues: #11283
compiler/rename/RnPat.hs
testsuite/tests/patsyn/should_compile/T11283.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T11283.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T