[commit: ghc] master: Reduce special-casing for nullary unboxed tuple (e9e61f1)

git at git.haskell.org git at git.haskell.org
Thu May 26 16:25:18 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e9e61f18a548b70693f4ccd245bc56335c94b498/ghc

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

commit e9e61f18a548b70693f4ccd245bc56335c94b498
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


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

e9e61f18a548b70693f4ccd245bc56335c94b498
 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 e9e61f18a548b70693f4ccd245bc56335c94b498


More information about the ghc-commits mailing list