[Git][ghc/ghc][wip/soulomoon/25647-allow-newtype-instance-in-gadt-syntax] Remove `IsGADT` case
Patrick (@soulomoon)
gitlab at gitlab.haskell.org
Mon Jan 13 08:37:18 UTC 2025
Patrick pushed to branch wip/soulomoon/25647-allow-newtype-instance-in-gadt-syntax at Glasgow Haskell Compiler / GHC
Commits:
3bf19b5c by Patrick at 2025-01-13T16:37:01+08:00
Remove `IsGADT` case
- - - - -
3 changed files:
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Error/Codes.hs
Changes:
=====================================
compiler/GHC/Tc/Errors/Ppr.hs
=====================================
@@ -1231,10 +1231,6 @@ instance Diagnostic TcRnMessage where
IsNonLinear ->
(text "A newtype constructor must be linear",
ppr con <+> dcolon <+> ppr (dataConDisplayType True con))
- IsGADT ->
- (text "A newtype must not be a GADT",
- ppr con <+> dcolon <+> pprWithInvisibleBitsWhen sneaky_eq_spec
- (ppr $ dataConDisplayType show_linear_types con))
HasConstructorContext ->
(text "A newtype constructor must not have a context in its type",
ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con))
=====================================
compiler/GHC/Tc/Errors/Types.hs
=====================================
@@ -4502,7 +4502,6 @@ pprFixedRuntimeRepProvenance FixedRuntimeRepPatSynSigRes = text "pattern synonym
data IllegalNewtypeReason
= DoesNotHaveSingleField !Int
| IsNonLinear
- | IsGADT
| HasConstructorContext
| HasExistentialTyVar
| HasStrictnessAnnotation
=====================================
compiler/GHC/Types/Error/Codes.hs
=====================================
@@ -661,7 +661,6 @@ type family GhcDiagnosticCode c = n | n -> c where
-- IllegalNewtypeReason
GhcDiagnosticCode "DoesNotHaveSingleField" = 23517
GhcDiagnosticCode "IsNonLinear" = 38291
- GhcDiagnosticCode "IsGADT" = 89498
GhcDiagnosticCode "HasConstructorContext" = 17440
GhcDiagnosticCode "HasExistentialTyVar" = 07525
GhcDiagnosticCode "HasStrictnessAnnotation" = 04049
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3bf19b5c64cea02639a21a25e38bcc0f3c085fdb
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3bf19b5c64cea02639a21a25e38bcc0f3c085fdb
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250113/edf7dfb8/attachment-0001.html>
More information about the ghc-commits
mailing list