Improve error message for UNPACK/strictness annotations.
authorHE, Tao <sighingnow@gmail.com>
Sun, 18 Feb 2018 16:10:37 +0000 (11:10 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sun, 18 Feb 2018 16:57:46 +0000 (11:57 -0500)
commitfc33f8b31b9c23cc12f02a028bbaeab06ba8fe96
treefb6def5fbe3eba0a02b59cfee383b2927f4c245f
parentd924c17dfc8d277a7460fa57217a9ab82f78ee4e
Improve error message for UNPACK/strictness annotations.

Print different error message for improper UNPACK and strictness
annotations.  Fix Trac #14761.

Signed-off-by: HE, Tao <sighingnow@gmail.com>
Test Plan: make test TEST="T7210 T14761a T14761b"

Reviewers: goldfire, bgamari, RyanGlScott, simonpj

Reviewed By: RyanGlScott, simonpj

Subscribers: simonpj, goldfire, rwbarton, thomie, carter

GHC Trac Issues: #14761

Differential Revision: https://phabricator.haskell.org/D4397
compiler/typecheck/TcHsType.hs
testsuite/tests/typecheck/should_fail/T14761a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T14761a.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T14761b.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T14761b.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T7210.stderr
testsuite/tests/typecheck/should_fail/all.T