[commit: ghc] ghc-8.0: Reduce special-casing for nullary unboxed tuple (9ddb933)

git at git.haskell.org git at git.haskell.org
Wed Aug 24 22:18:27 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/9ddb9338aa052ef06849c8d6cd8846916d7b2f23/ghc

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

commit 9ddb9338aa052ef06849c8d6cd8846916d7b2f23
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu May 26 15:24:53 2016 +0100

    Reduce special-casing for nullary unboxed tuple
    
    When we built the kind of a nullary unboxed tuple, we said, in
    TysWiredIn.mk_tuple:
    
        res_rep | arity == 0 = voidRepDataConTy
                      -- See Note [Nullary unboxed tuple] in Type
                | otherwise  = unboxedTupleRepDataConTy
    
    But this is bogus.  The Note deals with what the 'unarise' transformation
    does, and up to that point it's simpler and more uniform to treat
    nullary unboxed tuples the same as all the others.
    
    Nicer now.  And it fixes the Lint error in Trac #12115
    
    (cherry picked from commit e9e61f18a548b70693f4ccd245bc56335c94b498)


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

9ddb9338aa052ef06849c8d6cd8846916d7b2f23
 compiler/prelude/TysWiredIn.hs                   |  11 +-
 compiler/typecheck/TcHsType.hs                   |   2 +-
 compiler/types/TyCoRep.hs                        |   7 +
 compiler/types/Type.hs                           | 254 ++++++++++++-----------
 testsuite/tests/codeGen/should_compile/T12115.hs |   9 +
 testsuite/tests/codeGen/should_compile/all.T     |   1 +
 6 files changed, 153 insertions(+), 131 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 9ddb9338aa052ef06849c8d6cd8846916d7b2f23


More information about the ghc-commits mailing list