[commit: ghc] ghc-8.0: Test for newtype with unboxed argument (4c8aab8)

git at git.haskell.org git at git.haskell.org
Sat Oct 22 20:37:43 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/4c8aab8f5663b9f0f1acdcc1afc85d921f2609d6/ghc

>---------------------------------------------------------------

commit 4c8aab8f5663b9f0f1acdcc1afc85d921f2609d6
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.
    
    (cherry picked from commit 1f09c16c38a2112322d8eab95cd1269daaf5a818)


>---------------------------------------------------------------

4c8aab8f5663b9f0f1acdcc1afc85d921f2609d6
 compiler/typecheck/TcHsType.hs                     | 13 +-----
 compiler/typecheck/TcInstDcls.hs                   |  3 +-
 compiler/typecheck/TcTyClsDecls.hs                 | 47 ++++++++++++----------
 testsuite/tests/typecheck/should_fail/T12729.hs    | 11 +++++
 .../tests/typecheck/should_fail/T12729.stderr      | 10 +++++
 testsuite/tests/typecheck/should_fail/all.T        |  1 +
 .../tests/typecheck/should_fail/tcfail079.stderr   |  9 ++---
 7 files changed, 53 insertions(+), 41 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 4c8aab8f5663b9f0f1acdcc1afc85d921f2609d6


More information about the ghc-commits mailing list