Commit 2ca6ec78 authored by simonpj's avatar simonpj
Browse files

[project @ 2005-07-11 10:24:11 by simonpj]

Add test for unused variable in parallel list comp
parent 7a544808
......@@ -42,6 +42,7 @@ test('rn044', normal, multimod_compile, ['rn044', '-v0'])
clean(['Rn043_A.hi', 'Rn043_A.o', 'Rn043_B.hi', 'Rn043_B.o'])
test('rn045', normal, compile, [''])
test('rn046', normal, compile, ['-W'])
test('rn047', normal, compile, ['-W'])
test('timing001', normal, compile, [''])
test('timing002', normal, compile, [''])
......
{-# OPTIONS -fglasgow-exts -fwarn-unused-matches #-}
-- Tests unused-variable warnings in parallel list comprehensions
module ShouldCompile where
t :: [Int]
t = [ q | y <- [1..10]
| z <- [30..40], let q = z*z]
rn047.hs:7:10: Warning: Defined but not used: `y'
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