Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
fbdebd30
Commit
fbdebd30
authored
Jun 06, 2014
by
gzayas
Committed by
Joachim Breitner
Jun 06, 2014
Browse files
supress warning of bang wildcard pattern-binding (i.e. let !_ = rhs). This fixes #9127
parent
e577a523
Changes
4
Hide whitespace changes
Inline
Side-by-side
compiler/rename/RnBinds.lhs
View file @
fbdebd30
...
...
@@ -476,8 +476,9 @@ rnBind _ bind@(PatBind { pat_lhs = pat
bndrs = collectPatBinders pat
bind' = bind { pat_rhs = grhss', bind_fvs = fvs' }
is_wild_pat = case pat of
L _ (WildPat {}) -> True
_ -> False
L _ (WildPat {}) -> True
L _ (BangPat (L _ (WildPat {}))) -> True -- #9127
_ -> False
-- Warn if the pattern binds no variables, except for the
-- entirely-explicit idiom _ = rhs
...
...
testsuite/tests/rename/should_compile/T9127.hs
0 → 100644
View file @
fbdebd30
{-# LANGUAGE BangPatterns #-}
module
T9127
where
f
=
let
!
_
=
2
*
2
in
2
*
2
testsuite/tests/rename/should_compile/T9127.stderr
0 → 100644
View file @
fbdebd30
testsuite/tests/rename/should_compile/all.T
View file @
fbdebd30
...
...
@@ -214,3 +214,4 @@ test('T7969',
'
T7969.imports
'])],
run_command
,
['
$MAKE -s --no-print-directory T7969
'])
test
('
T9127
',
normal
,
compile
,
[''])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment