|
Re: -fwarn-unused-matches: msg#00077lang.haskell.glasgow.bugs
"Serge D. Mechveliani" <mechvel@xxxxxxxx> writes: > ghc -c -fwarn-unused-matches > says > Warning: Defined but not used: x > when compiling the function > > f :: Eq a => [(a, a)] -> (a, a) -> [(a, a)] > f ps (x, y) = [(z, y) | (z, x) <- ps] > > Is it a bug? No. The x on the right is in a different scope to the x on the left. You probably intended to write: f ps (x, y) = [(z, y) | (z, x') <- ps, x==x'] Regards, Malcolm
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: -fwarn-unused-matches, Simon Marlow |
|---|---|
| Next by Date: | [ ghc-Bugs-604466 ] x86 NCG bug with stdcall f.i. "wrapper", SourceForge.net |
| Previous by Thread: | -fwarn-unused-matches, Serge D. Mechveliani |
| Next by Thread: | RE: -fwarn-unused-matches, Simon Marlow |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |