Commit 986ffd7f authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-24 15:56:54 by simonmar]

Add tests for the warning problems reported by Marcin earlier this week.
parent ae578d6f
......@@ -61,3 +61,5 @@ test "ds048" { vtc("") }
test "ds049" { vtc("-fvia-C -package lang") }
test "ds050" { vtc("-fglasgow-exts") }
test "ds051" { vtc("") }
test "ds052" { $expect = "fail" vtc("") }
test "ds053" { $expect = "fail" vtc("") }
{-# OPTIONS -fwarn-incomplete-patterns #-}
module ShouldCompile where
-- should *not* produce a warning about non-exhaustive patterns
lazyZip:: [a] -> [b] -> [(a, b)]
lazyZip [] _ = []
lazyZip (x:xs) ~(y:ys) = (x, y):lazyZip xs ys
{-# OPTIONS -fwarn-unused-binds #-}
module ShouldCompile() where
-- should warn about unused f, even though f is used in itself
f = f
Supports Markdown
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