X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FUtil.lhs;h=0a77e4d92a527205da2d639b0a01a76370e688b3;hb=218ca73afa77095237ad960289322e6009563744;hp=ed4a4b9ead2f7ad259df70ae7b57a643519d7e0f;hpb=b98b590f7f62cd8f5c1653584ce37ebf5ac09ffd;p=ghc-hetmet.git diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index ed4a4b9..0a77e4d 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -705,22 +705,6 @@ removeSpaces = reverse . dropWhile isSpace . reverse . dropWhile isSpace %* * %************************************************************************ -The following provide us higher order functions that, when applied -to a function, operate on pairs. - -\begin{code} -#if NOT_USED -applyToPair :: ((a -> c),(b -> d)) -> (a,b) -> (c,d) -applyToPair (f,g) (x,y) = (f x, g y) - -applyToFst :: (a -> c) -> (a,b)-> (c,b) -applyToFst f (x,y) = (f x,y) - -applyToSnd :: (b -> d) -> (a,b) -> (a,d) -applyToSnd f (x,y) = (x,f y) -#endif -\end{code} - \begin{code} unzipWith :: (a -> b -> c) -> [(a, b)] -> [c] unzipWith f pairs = map ( \ (a, b) -> f a b ) pairs @@ -749,6 +733,7 @@ consIORef var x = do Module names: \begin{code} +looksLikeModuleName :: String -> Bool looksLikeModuleName [] = False looksLikeModuleName (c:cs) = isUpper c && go cs where go [] = True