\begin{code}
module Util (
- debugIsOn,
+ debugIsOn, isWindowsHost,
-- general list processing
zipEqual, zipWithEqual, zipWith3Equal, zipWith4Equal,
%************************************************************************
%* *
-\subsection{-DDEBUG}
+\subsection{Is DEBUG on, are we on Windows?}
%* *
%************************************************************************
#else
debugIsOn = False
#endif
+
+isWindowsHost :: Bool
+#ifdef mingw32_HOST_OS
+isWindowsHost = True
+#else
+isWindowsHost = False
+#endif
\end{code}
%************************************************************************
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}