Test for newtype with unboxed argument
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 19 Oct 2016 11:22:11 +0000 (12:22 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 19 Oct 2016 11:23:54 +0000 (12:23 +0100)
commit1f09c16c38a2112322d8eab95cd1269daaf5a818
tree6cf15260b84b2a24e515233231337ebafbce89c5
parent02f2f21ce4a9969406cf1772dc5955a97386777a
Test for newtype with unboxed argument

Newtypes cannot (currently) have an unboxed argument type.
But Trac #12729 showed that this was only being checked for
newtypes in H98 syntax; in GADT snytax they were let through.

This patch moves the test to checkValidDataCon, where it properly
belongs.
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcTyClsDecls.hs
testsuite/tests/typecheck/should_fail/T12729.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12729.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T
testsuite/tests/typecheck/should_fail/tcfail079.stderr