Refine ASSERT in buildPatSyn for the nullary case.
authorMatthew Pickering <matthewtpickering@gmail.com>
Wed, 26 Oct 2016 15:19:48 +0000 (11:19 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 26 Oct 2016 15:19:49 +0000 (11:19 -0400)
commit23143f60680f78f80762754fe060a3e8c6dc9a01
tree6468024b284448e9e9d11d14e42ca9e6b4052e52
parent488a9ed3440fe882ae043ba7f44fed4e84e679ce
Refine ASSERT in buildPatSyn for the nullary case.

For a nullary pattern synonym we add an extra void argument to the
matcher in order to preserve laziness. The check in buildPatSyn
wasn't aware of this special case which was causing the assertion to
fail.

Reviewers: austin, simonpj, bgamari

Reviewed By: simonpj, bgamari

Subscribers: simonpj, thomie

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

GHC Trac Issues: #12746
compiler/iface/BuildTyCl.hs
testsuite/tests/patsyn/should_compile/T12746.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T12746A.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T