diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2022-10-09 14:15:37 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-10 17:14:06 -0400 |
commit | 44fcdb04467c23b794a82451c64cbfaed6f4ef62 (patch) | |
tree | c735f6e874bebd6e61eb0947cc9e5de81fd5fa90 | |
parent | 945e8e491441c1efdab7c0e1bd2e04d0224a4ad5 (diff) | |
download | haskell-44fcdb04467c23b794a82451c64cbfaed6f4ef62.tar.gz |
Parser/PostProcess: rename failOp* functions
There are three functions named failOp* in the parser:
failOpNotEnabledImportQualifiedPost
failOpImportQualifiedTwice
failOpFewArgs
Only the last one has anything to do with operators. The other two
were named this way either by mistake or due to a misunderstanding of
what "op" stands for. This small patch corrects this.
-rw-r--r-- | compiler/GHC/Parser/PostProcess.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs index bac8706d33..99e8fd10c8 100644 --- a/compiler/GHC/Parser/PostProcess.hs +++ b/compiler/GHC/Parser/PostProcess.hs @@ -96,8 +96,8 @@ module GHC.Parser.PostProcess ( warnStarIsType, warnPrepositiveQualifiedModule, failOpFewArgs, - failOpNotEnabledImportQualifiedPost, - failOpImportQualifiedTwice, + failNotEnabledImportQualifiedPost, + failImportQualifiedTwice, SumOrTuple (..), @@ -1133,13 +1133,13 @@ checkImportDecl mPre mPost = do -- 'ImportQualifiedPost' is not in effect. whenJust mPost $ \post -> when (not importQualifiedPostEnabled) $ - failOpNotEnabledImportQualifiedPost (RealSrcSpan (epaLocationRealSrcSpan post) Strict.Nothing) + failNotEnabledImportQualifiedPost (RealSrcSpan (epaLocationRealSrcSpan post) Strict.Nothing) -- Error if 'qualified' occurs in both pre and postpositive -- positions. whenJust mPost $ \post -> when (isJust mPre) $ - failOpImportQualifiedTwice (RealSrcSpan (epaLocationRealSrcSpan post) Strict.Nothing) + failImportQualifiedTwice (RealSrcSpan (epaLocationRealSrcSpan post) Strict.Nothing) -- Warn if 'qualified' found in prepositive position and -- 'Opt_WarnPrepositiveQualifiedModule' is enabled. @@ -2873,12 +2873,12 @@ warnPrepositiveQualifiedModule :: SrcSpan -> P () warnPrepositiveQualifiedModule span = addPsMessage span PsWarnImportPreQualified -failOpNotEnabledImportQualifiedPost :: SrcSpan -> P () -failOpNotEnabledImportQualifiedPost loc = +failNotEnabledImportQualifiedPost :: SrcSpan -> P () +failNotEnabledImportQualifiedPost loc = addError $ mkPlainErrorMsgEnvelope loc $ PsErrImportPostQualified -failOpImportQualifiedTwice :: SrcSpan -> P () -failOpImportQualifiedTwice loc = +failImportQualifiedTwice :: SrcSpan -> P () +failImportQualifiedTwice loc = addError $ mkPlainErrorMsgEnvelope loc $ PsErrImportQualifiedTwice warnStarIsType :: SrcSpan -> P () |