[Git][ghc/ghc][wip/jbruenker/foreach] wip remove foreach error

Jakob Brünker (@JakobBruenker) gitlab at gitlab.haskell.org
Sun Jul 30 18:46:34 UTC 2023



Jakob Brünker pushed to branch wip/jbruenker/foreach at Glasgow Haskell Compiler / GHC


Commits:
da668bb3 by Jakob Bruenker at 2023-07-30T20:46:19+02:00
wip remove foreach error

- - - - -


3 changed files:

- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Types/Error/Codes.hs


Changes:

=====================================
compiler/GHC/Parser/Errors/Ppr.hs
=====================================
@@ -211,8 +211,6 @@ instance Diagnostic PsMessage where
       -> mkSimpleDecorated $ text "Fields cannot be qualified when OverloadedRecordUpdate is enabled"
     PsErrExplicitForall is_unicode
       -> mkSimpleDecorated $ text "Illegal symbol" <+> quotes (forallSym is_unicode) <+> text "in type"
-    PsErrForeach is_unicode
-      -> mkSimpleDecorated $ text "Illegal symbol" <+> quotes (foreachSym is_unicode) <+> text "in type"
     PsErrIllegalQualifiedDo qdoDoc
       -> mkSimpleDecorated $
            text "Illegal qualified" <+> quotes qdoDoc <+> text "block"
@@ -553,7 +551,6 @@ instance Diagnostic PsMessage where
     PsErrIllegalPatSynExport                      -> ErrorWithoutFlag
     PsErrOverloadedRecordUpdateNoQualifiedFields  -> ErrorWithoutFlag
     PsErrExplicitForall{}                         -> ErrorWithoutFlag
-    PsErrForeach{}                                -> ErrorWithoutFlag
     PsErrIllegalQualifiedDo{}                     -> ErrorWithoutFlag
     PsErrQualifiedDoInCmd{}                       -> ErrorWithoutFlag
     PsErrRecordSyntaxInPatSynDecl{}               -> ErrorWithoutFlag
@@ -691,7 +688,6 @@ instance Diagnostic PsMessage where
       let info = text "or a similar language extension to enable explicit-forall syntax:" <+>
                  forallSym is_unicode <+> text "<tvs>. <type>"
       in [ suggestExtensionWithInfo info LangExt.RankNTypes ]
-    PsErrForeach is_unicode                       -> [suggestExtension LangExt.Foreach]
     PsErrIllegalQualifiedDo{}                     -> [suggestExtension LangExt.QualifiedDo]
     PsErrQualifiedDoInCmd{}                       -> noHints
     PsErrRecordSyntaxInPatSynDecl{}               -> noHints


=====================================
compiler/GHC/Parser/Errors/Types.hs
=====================================
@@ -433,10 +433,6 @@ data PsMessage
    | PsErrExplicitForall !Bool
                          -- ^ is Unicode forall?
 
-   -- | foreach found but no extension allowing it is enabled
-   | PsErrForeach !Bool
-                  -- ^ is Unicode foreach?
-
    -- | Found qualified-do without QualifiedDo enabled
    | PsErrIllegalQualifiedDo !SDoc
 


=====================================
compiler/GHC/Types/Error/Codes.hs
=====================================
@@ -189,8 +189,6 @@ type family GhcDiagnosticCode c = n | n -> c where
   GhcDiagnosticCode "PsErrIllegalPatSynExport"                      = 89515
   GhcDiagnosticCode "PsErrOverloadedRecordUpdateNoQualifiedFields"  = 94863
   GhcDiagnosticCode "PsErrExplicitForall"                           = 25955
-  -- XXX JB do we need this? probably depends on whether foreach is a keyword without extension
-  GhcDiagnosticCode "PsErrForeach"                                  = 13790
   GhcDiagnosticCode "PsErrIllegalQualifiedDo"                       = 40280
   GhcDiagnosticCode "PsErrQualifiedDoInCmd"                         = 54089
   GhcDiagnosticCode "PsErrRecordSyntaxInPatSynDecl"                 = 28021



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/da668bb339b05165ed0a8596d1856dd8cecc506f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/da668bb339b05165ed0a8596d1856dd8cecc506f
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/20230730/fb860b5a/attachment-0001.html>


More information about the ghc-commits mailing list