From 8e3f4465c2a85e6328df52939c9e2429dc63aaca Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 13 May 2008 19:39:01 +0000 Subject: [PATCH 1/1] Rewrite zipLazy to be warning-free for GHC 6.4 --- compiler/utils/Util.lhs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 1d11b90..8cfdf83 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -202,7 +202,12 @@ zipWith4Equal msg _ _ _ _ _ = panic ("zipWith4Equal: unequal lists:"++msg) zipLazy :: [a] -> [b] -> [(a,b)] zipLazy [] _ = [] -zipLazy (x:xs) ~(y:ys) = (x,y) : zipLazy xs ys +-- We want to write this, but with GHC 6.4 we get a warning, so it +-- doesn't validate: +-- zipLazy (x:xs) ~(y:ys) = (x,y) : zipLazy xs ys +-- so we write this instead: +zipLazy (x:xs) zs = let y : ys = zs + in (x,y) : zipLazy xs ys \end{code} -- 1.7.10.4