Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sum-types: Rename Newtype to NominalType #1607

Closed
RyanGlScott opened this issue Jan 19, 2024 · 0 comments
Closed

sum-types: Rename Newtype to NominalType #1607

RyanGlScott opened this issue Jan 19, 2024 · 0 comments
Labels
enums Issues related to enums tech-debt For issues that require some internal refactoring.

Comments

@RyanGlScott
Copy link
Contributor

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).

@RyanGlScott RyanGlScott added tech-debt For issues that require some internal refactoring. enums Issues related to enums labels Jan 19, 2024
@yav yav closed this as completed Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enums Issues related to enums tech-debt For issues that require some internal refactoring.
Projects
None yet
Development

No branches or pull requests

2 participants