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
Showing
- compiler/prelude/TysWiredIn.hs 4 additions, 7 deletionscompiler/prelude/TysWiredIn.hs
- compiler/typecheck/TcHsType.hs 1 addition, 1 deletioncompiler/typecheck/TcHsType.hs
- compiler/types/TyCoRep.hs 7 additions, 0 deletionscompiler/types/TyCoRep.hs
- compiler/types/Type.hs 131 additions, 123 deletionscompiler/types/Type.hs
- testsuite/tests/codeGen/should_compile/T12115.hs 9 additions, 0 deletionstestsuite/tests/codeGen/should_compile/T12115.hs
- testsuite/tests/codeGen/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/codeGen/should_compile/all.T
Loading
Please register or sign in to comment