Make splitStrProdDmd (and similarly Use) more robust
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 19 Jun 2014 08:46:24 +0000 (09:46 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 20 Jun 2014 07:16:45 +0000 (08:16 +0100)
commit2e362ddebf2286409b7423d3dd49152117c1ae56
tree8f157d2a83ef3bdad29b884a6e3ef904692db869
parentaec9e75bb09f6a99d77d3aeea255229ffb1925fa
Make splitStrProdDmd (and similarly Use) more robust

The issue here is avoiding a GHC crash when a program uses
unsafeCoerce is a dangerous (or even outright-wrong) way.

See Trac #9208
compiler/basicTypes/Demand.lhs
testsuite/tests/stranal/should_compile/T9208.hs [new file with mode: 0644]
testsuite/tests/stranal/should_compile/all.T