Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
146d22fc
Commit
146d22fc
authored
Jul 27, 2006
by
simonpj
Browse files
Add test for overlapping pattern warnings for lazy patterns
parent
73b32a6d
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/deSugar/should_compile/all.T
View file @
146d22fc
...
...
@@ -61,3 +61,4 @@ test('ds054', normal, compile, [''])
test
('
ds055
',
only_compiler_types
(['
ghc
']),
compile
,
[''])
test
('
ds056
',
normal
,
compile
,
['
-Wall
'])
test
('
ds057
',
normal
,
compile
,
[''])
test
('
ds058
',
normal
,
compile
,
['
-W
'])
testsuite/tests/ghc-regress/deSugar/should_compile/ds058.hs
0 → 100644
View file @
146d22fc
-- Test overlapping pattern warnings
module
ShouldCompile
where
f
x
=
case
x
of
Just
(
~
1
)
->
0
Just
_
->
1
-- This one cannot match
Nothing
->
2
testsuite/tests/ghc-regress/deSugar/should_compile/ds058.stderr
0 → 100644
View file @
146d22fc
ds058.hs:5:6:
Warning: Pattern match(es) are overlapped
In a case alternative: Just _ -> ...
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