Refactor TyCon to eliminate TupleTyCon
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 30 Apr 2015 22:33:42 +0000 (23:33 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 1 May 2015 07:31:22 +0000 (08:31 +0100)
commitf6ab0f2d595b34f33716513c0bf71b30f8b8e015
treef43240a0ff43468515a3a21ee062abe535f9f2a6
parentbbfa0caa20546aa2428c8a235862605762d0feee
Refactor TyCon to eliminate TupleTyCon

This makes TupleTyCon into an ordinary AlgTyCon, distinguished
by its AlgTyConRhs, rather than a separate constructor of TyCon.

It is preparatory work for making constraint tuples into classes,
for which the ConstraintTuple tuples will have a TyConParent
of a ClassTyCon.  Tuples didn't have this possiblity before.

The patch affects other modules because I eliminated the
unsatisfactory partial functions tupleTyConBoxity and tupleTyConSort.
And tupleTyConArity which is just tyConArity.
compiler/coreSyn/PprCore.hs
compiler/deSugar/Check.hs
compiler/iface/BinIface.hs
compiler/iface/IfaceType.hs
compiler/iface/MkIface.hs
compiler/prelude/TysWiredIn.hs
compiler/typecheck/TcGenDeriv.hs
compiler/typecheck/TcTyDecls.hs
compiler/types/TyCon.hs
compiler/types/TypeRep.hs
compiler/vectorise/Vectorise/Type/TyConDecl.hs