summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2022-03-10 23:42:49 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-12 07:02:40 -0500
commitcf081476eb60ba8d65335234b654b457154b9d83 (patch)
tree1d7ae8f04797c0e69f4e6f643e9e4a5103a5bc5f /compiler/GHC
parente40cf4ef6cab8e02fcd34efdf98f1715bfa7315c (diff)
downloadhaskell-cf081476eb60ba8d65335234b654b457154b9d83.tar.gz
checkUnboxedLitPat: use non-fatal addError
This enables GHC to report more parse errors in a single pass.
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Parser/PostProcess.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs
index b9be24259a..e5557855c0 100644
--- a/compiler/GHC/Parser/PostProcess.hs
+++ b/compiler/GHC/Parser/PostProcess.hs
@@ -1869,14 +1869,14 @@ checkUnboxedLitPat (L loc lit) =
-- Don't allow primitive string literal patterns.
-- See #13260.
HsStringPrim {}
- -> addFatalError $ mkPlainErrorMsgEnvelope loc $
+ -> addError $ mkPlainErrorMsgEnvelope loc $
(PsErrIllegalUnboxedStringInPat lit)
-- Don't allow Float#/Double# literal patterns.
-- See #9238 and Note [Rules for floating-point comparisons]
-- in GHC.Core.Opt.ConstantFold.
_ | is_floating_lit lit
- -> addFatalError $ mkPlainErrorMsgEnvelope loc $
+ -> addError $ mkPlainErrorMsgEnvelope loc $
(PsErrIllegalUnboxedFloatingLitInPat lit)
| otherwise