summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_compile/T13215.hs
Commit message (Collapse)AuthorAgeFilesLines
* Fix push_bang_into_newtype when the pattern match has no argumentsMatthew Pickering2017-02-071-0/+6
Correct behaviour of push_bang_into_newtype when the pattern match has no arguments. A user can write ``` newtype T = T Int f :: T -> () f !(T {}) = () ``` in which case we have to push the bang inwards through the newtype in order to achieve the desired strictness properties. This patch fixes this special case where the pattern match has no arguments to push the bang onto. We now make up a wildcard pattern which is wrapped in the bang pattern. ``` f (T !_) = () ``` Reviewers: simonpj, austin, bgamari Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D3057