Fix #14608 by restoring an unboxed tuple check
authorRyan Scott <ryan.gl.scott@gmail.com>
Tue, 2 Jan 2018 21:03:08 +0000 (16:03 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 4 Jan 2018 19:04:08 +0000 (14:04 -0500)
commitec6af9c49ba86d1cd7fa85527bcb97c605f2fd39
tree40213ea3b21711f4f998cd036add98198adebc17
parent2fc621df9200475c471cb62a0c30ce4eae2d1dcd
Fix #14608 by restoring an unboxed tuple check

Commit 714bebff44076061d0a719c4eda2cfd213b7ac3d removed
a check in the bytecode compiler that caught illegal uses of unboxed
tuples (and now sums) in case alternatives, which causes the program
in #14608 to panic. This restores the check (using modern,
levity-polymorphic vocabulary).

Test Plan: make test TEST=T14608

Reviewers: hvr, bgamari, dfeuer, simonpj

Reviewed By: dfeuer, simonpj

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #14608

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

(cherry picked from commit ecff651fc2f6d9833131e3e7fbc9a37b5b2f84ee)
compiler/ghci/ByteCodeGen.hs
testsuite/tests/ghci/should_fail/T14608.hs [new file with mode: 0644]
testsuite/tests/ghci/should_fail/T14608.script [new file with mode: 0644]
testsuite/tests/ghci/should_fail/T14608.stderr [new file with mode: 0644]
testsuite/tests/ghci/should_fail/all.T