mkDataConRep: fix bug in strictness signature (#14290)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 28 Sep 2017 17:08:45 +0000 (13:08 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 28 Sep 2017 17:44:05 +0000 (13:44 -0400)
commita0671e2de97c5801bfba4b12f16e498492681bc1
tree8f16dc47f31fd3b9fcf95c883a6f252ef4f38ec9
parent78e673910f8759f643b263c70ad5c8fffd11a55d
mkDataConRep: fix bug in strictness signature (#14290)

The strictness signature for a data con wrapper wasn't including any
dictionary arguments, which meant that bangs on the fields of a
constructor with an existential context would be moved to the wrong
fields.  See T14290 for an example.

Test Plan:
* New test T14290
* validate

Reviewers: simonpj, niteria, austin, bgamari, erikd

Reviewed By: simonpj, bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14290

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

(cherry picked from commit 5935acdb1302263011c2023d5e7f4ec496c972c0)
compiler/basicTypes/MkId.hs
testsuite/tests/stranal/should_run/T14290.hs [new file with mode: 0644]
testsuite/tests/stranal/should_run/all.T