Reduce special-casing for nullary unboxed tuple
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 26 May 2016 14:24:53 +0000 (15:24 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 26 May 2016 14:24:53 +0000 (15:24 +0100)
commite9e61f18a548b70693f4ccd245bc56335c94b498
tree435656be2c2523687e46836814cffb8cd1d613f9
parent0f1e315b9274725c4a2c975f4d06a5c956cf5385
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
compiler/prelude/TysWiredIn.hs
compiler/typecheck/TcHsType.hs
compiler/types/TyCoRep.hs
compiler/types/Type.hs
testsuite/tests/codeGen/should_compile/T12115.hs [new file with mode: 0644]
testsuite/tests/codeGen/should_compile/all.T