Skip to content

Refactor NewHsTypeX to DerivedCoreTy

NewHsTypeX is not a good name for this construct:

data NewHsTypeX
  = NHsCoreTy Type -- An escape hatch for tunnelling a *closed*
                   -- Core Type through HsSyn.
  • the New prefix refers to the fact that it is a new approach, rather than to a property of the entity
  • it is not suggestive of the way NewHsTypeX is used in the code and why it exists

A better name would be DerivedCoreTy. The reason for NHsCoreTy existence and its invariant of being closed is the deriving mechanism.

Doing this renaming also exposes incorrect uses of NHsCoreTy in a couple of places that violate the invariant (in some calls to unifyKind).

Trac metadata
Trac field Value
Version 8.6.1
Type Task
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information