Skip to content
Snippets Groups Projects
Commit 69add38d authored by sof's avatar sof
Browse files

[project @ 1999-02-06 16:10:18 by sof]

New regression test - overlapped patterns involving labelled fields.
parent 43f20ce4
No related merge requests found
ds002.hs:7: Pattern match(es) are overlapped in the definition of function `f':
f y = ...
f z = ...
......
ds003.hs:5: Pattern match(es) are overlapped in the definition of function `f':
f (x : (x1 : (x2 : x3))) ~(y, ys) z = ...
f x y True = ...
......
ds019.hs:5: Pattern match(es) are overlapped in the definition of function `f':
f d (j, k) p = ...
f (e, f, g) l q = ...
......
ds020.hs:5: Pattern match(es) are overlapped in the definition of function `a':
a ~(~[], ~[], ~[]) = ...
......
ds022.hs:20: Pattern match(es) are overlapped in the definition of function `i':
i 1 1.1 = ...
i 2 2.2 = ...
......
ds040.hs:7: Pattern match(es) are overlapped in the definition of function `^^^^':
^^^^ _ _ = ...
......
-- !!! Checking the exhaustiveness of constructor
-- !!! with labelled fields.
module ShouldCompile where
data E = B { a,b,c,d,e,f :: Bool }
bug x =
case x of
B _ _ _ _ True False -> undefined
B {e=True, f=False} -> undefined
B {a=a,f=False,e=False} -> undefined
ds043.hs:8: Pattern match(es) are overlapped in a group of case alternatives beginning
(B _ _ _ _ True False):
B {e = True, f = False} -> ...
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment