Skip to content

Clean up `isTcLevPoly` and `UnboxedAlgTyCon`

  • The GHC.Core.TyCon.isTcLevPoly function checks whether a tycon can be representation polymorphic. But that's not what its name sounds like.
  • The UnboxedAlgTyCon constructor of AlgTyConFlav says that it describes an "unboxed type constructor". But that's not really true any more. It describes only unboxed products and sums. Other unboxed types fit in VanillaAlgTyCon.
  • The flavour of an algebraic tycon (of type AlgTyConFlav) is stored in a field named algTcParent. This field name is misleading, because it's not just used to access a parent.

No bugs here, just confusing code.

Edited by Richard Eisenberg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information