From e74cd017fc700e503c8a0b0e94d8b8f9d8c92510 Mon Sep 17 00:00:00 2001 From: sewardj Date: Tue, 5 Dec 2000 12:09:43 +0000 Subject: [PATCH] [project @ 2000-12-05 12:09:43 by sewardj] Partially fix driver breakage. --- ghc/compiler/main/DriverState.hs | 9 +++++---- ghc/compiler/main/TmpFiles.hs | 4 ++-- ghc/compiler/utils/Util.lhs | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ghc/compiler/main/DriverState.hs b/ghc/compiler/main/DriverState.hs index ae738ff..a825926 100644 --- a/ghc/compiler/main/DriverState.hs +++ b/ghc/compiler/main/DriverState.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverState.hs,v 1.17 2000/12/04 16:42:14 rrt Exp $ +-- $Id: DriverState.hs,v 1.18 2000/12/05 12:09:43 sewardj Exp $ -- -- Settings for the driver -- @@ -553,8 +553,9 @@ data WayName GLOBAL_VAR(v_Ways, [] ,[WayName]) -allowed_combinations way = ways `elem` combs - where -- the sub-lists must be ordered according to WayName, because findBuildTag sorts them +allowed_combination way = way `elem` combs + where -- the sub-lists must be ordered according to WayName, + -- because findBuildTag sorts them combs = [ [WayProf,WayUnreg], [WayProf,WaySMP] ] findBuildTag :: IO [String] -- new options @@ -568,7 +569,7 @@ findBuildTag = do writeIORef v_Build_tag (wayTag details) return (wayOpts details) - ws -> if not allowed_combination ws + ws -> if not (allowed_combination ws) then throwDyn (OtherError $ "combination not supported: " ++ foldr1 (\a b -> a ++ '/':b) diff --git a/ghc/compiler/main/TmpFiles.hs b/ghc/compiler/main/TmpFiles.hs index 4f0805d..1912cbe 100644 --- a/ghc/compiler/main/TmpFiles.hs +++ b/ghc/compiler/main/TmpFiles.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: TmpFiles.hs,v 1.9 2000/12/04 16:42:14 rrt Exp $ +-- $Id: TmpFiles.hs,v 1.10 2000/12/05 12:09:43 sewardj Exp $ -- -- Temporary file management -- @@ -42,7 +42,7 @@ initTempFileStorage = do #ifndef mingw32_TARGET_OS writeIORef v_TmpDir dir #endif - ) + ) cleanTempFiles :: Bool -> IO () cleanTempFiles verbose = do diff --git a/ghc/compiler/utils/Util.lhs b/ghc/compiler/utils/Util.lhs index 78aec40..cb2c5b6 100644 --- a/ghc/compiler/utils/Util.lhs +++ b/ghc/compiler/utils/Util.lhs @@ -40,7 +40,7 @@ module Util ( mapAccumL, mapAccumR, mapAccumB, foldl2, count, -- comparisons - thenCmp, cmpList, prefixMatch, postfixMatch, + thenCmp, cmpList, prefixMatch, suffixMatch, -- strictness seqList, ($!), @@ -657,8 +657,8 @@ prefixMatch _pat [] = False prefixMatch (p:ps) (s:ss) | p == s = prefixMatch ps ss | otherwise = False -postfixMatch :: Eq a => [a] -> [a] -> Bool -postfixMatch pat str = prefixMatch (reverse pat) (reverse str) +suffixMatch :: Eq a => [a] -> [a] -> Bool +suffixMatch pat str = prefixMatch (reverse pat) (reverse str) \end{code} %************************************************************************ -- 1.7.10.4