Skip to content

sum-types: Rename Newtype to NominalType #1607

@RyanGlScott

Description

@RyanGlScott

On the sum-types branch (#1602), we have this data type:

-- | Nominal types
data Newtype = Newtype
{ ntName :: Name
, ntParams :: [TParam]
, ntConstraints :: [Prop]
, ntDef :: NewtypeDef
, ntDoc :: Maybe Text
} deriving (Show, Generic, NFData)

Although it is named "Newtype", this is quite misleading, as this now encompasses both newtypes and enums. To make this more obvious, we should rename Newtype to NominalType. We should also rename related definitions (e.g., NewtypeDef).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enumsIssues related to enumstech-debtFor issues that require some internal refactoring.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions