summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2019-05-02 07:42:16 +0300
committerVladislav Zavialov <vlad.z.4096@gmail.com>2019-05-04 12:16:17 +0300
commitdfee262437d2bfba5a6ad50e2528976fc66c1365 (patch)
tree21c9d81a2087b2735bb0d5e9534c44752bd99523 /compiler/parser/Parser.y
parent0a3e4db325ed2d073c9664f6ce1f9165181116b0 (diff)
downloadhaskell-wip/16619.tar.gz
'warnSpaceAfterBang' only in patterns (#16619)wip/16619
Diffstat (limited to 'compiler/parser/Parser.y')
-rw-r--r--compiler/parser/Parser.y21
1 files changed, 2 insertions, 19 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index 80e197e039..e6f639edb3 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -2601,14 +2601,8 @@ infixexp_top :: { ECP }
$2 >>= \ $2 ->
runECP_PV $1 >>= \ $1 ->
runECP_PV $3 >>= \ $3 ->
- do { when (srcSpanEnd (getLoc $2)
- == srcSpanStart (getLoc $3)
- && checkIfBang (unLoc $2)) $
- warnSpaceAfterBang (comb2 $2 $3);
- amms (mkHsOpAppPV (comb2 $1 $>) $1 $2 $3)
- [mj AnnVal $2]
- }
- }
+ amms (mkHsOpAppPV (comb2 $1 $>) $1 $2 $3)
+ [mj AnnVal $2] }
exp10_top :: { ECP }
: '-' fexp { ECP $
@@ -3963,17 +3957,6 @@ hintExplicitForall tok = do
where
forallSymDoc = text (forallSym (isUnicode tok))
--- | Warn about missing space after bang
-warnSpaceAfterBang :: SrcSpan -> PV ()
-warnSpaceAfterBang span = do
- bang_on <- getBit BangPatBit
- unless bang_on $
- addWarning Opt_WarnSpaceAfterBang span msg
- where
- msg = text "Did you forget to enable BangPatterns?" $$
- text "If you mean to bind (!) then perhaps you want" $$
- text "to add a space after the bang for clarity."
-
-- When two single quotes don't followed by tyvar or gtycon, we report the
-- error as empty character literal, or TH quote that missing proper type
-- variable or constructor. See #13450.