Commit f9471769 authored by simonpj's avatar simonpj
Browse files

[project @ 2005-08-22 08:59:15 by simonpj]

Slightly better overlap checking
parent 692af8d4
......@@ -59,3 +59,4 @@ test('ds052', expect_fail_if_compiler_type('ghc'), compile, [''])
test('ds053', normal, compile, [''])
test('ds054', normal, compile, [''])
test('ds055', only_compiler_types(['ghc']), compile, [''])
test('ds056', normal, compile, ['-Wall'])
ds040.hs:9:0:
Warning: Pattern match(es) are overlapped
In the definition of `^^^^': ^^^^ _ _ = ...
ds052.hs:6:0:
Warning: Pattern match(es) are non-exhaustive
In the definition of `lazyZip': Patterns not matched: (_ : _) []
-- Check overlap in n+k patterns
module Foo where
g :: Int -> Int
g (x+1) = x
g y = y
g _ = 0 -- Overlapped
h :: Int -> Int
h (x+1) = x
h _ = 0 -- Not overlapped
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment