Refactor TcTyCon into its own type
TcTyCon
is currently a constructor of TyCon
. However, there are a number of places during type inference where we know statically that a TyCon
should always be a TcTyCon
. Indeed we have a type synonym type TcTyCon = TyCon
for this purpose.
I think it would be better to move TcTyCon
out to its own type and then embed that in TyCon
as necessary. (If we ever split TcType
from Type
, we won't embed in TyCon
.) This gives better static guarantees. With an {-# UNPACK #-}
, I don't think there is any loss, at all.