[commit: ghc] master: Test for newtype with unboxed argument (1f09c16)
git at git.haskell.org
git at git.haskell.org
Wed Oct 19 11:24:10 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/1f09c16c38a2112322d8eab95cd1269daaf5a818/ghc
>---------------------------------------------------------------
commit 1f09c16c38a2112322d8eab95cd1269daaf5a818
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Oct 19 12:22:11 2016 +0100
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.
>---------------------------------------------------------------
1f09c16c38a2112322d8eab95cd1269daaf5a818
compiler/typecheck/TcHsType.hs | 13 +-----
compiler/typecheck/TcInstDcls.hs | 3 +-
compiler/typecheck/TcTyClsDecls.hs | 50 ++++++++++++----------
testsuite/tests/typecheck/should_fail/T12729.hs | 11 +++++
.../tests/typecheck/should_fail/T12729.stderr | 10 +++++
testsuite/tests/typecheck/should_fail/all.T | 2 +-
.../tests/typecheck/should_fail/tcfail079.stderr | 9 ++--
7 files changed, 56 insertions(+), 42 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1f09c16c38a2112322d8eab95cd1269daaf5a818
More information about the ghc-commits
mailing list