From f1f24b1290313eb2105b162170cf84e92e939492 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 17 Nov 2003 14:41:03 +0000 Subject: [PATCH] [project @ 2003-11-17 14:41:03 by simonmar] Add an export list; GC dead code. --- ghc/compiler/main/DriverUtil.hs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index 0896f5b..69c276d 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverUtil.hs,v 1.40 2003/11/10 12:04:25 simonpj Exp $ +-- $Id: DriverUtil.hs,v 1.41 2003/11/17 14:41:03 simonmar Exp $ -- -- Utils for the driver -- @@ -7,7 +7,17 @@ -- ----------------------------------------------------------------------------- -module DriverUtil where +module DriverUtil ( + getOptionsFromSource, softGetDirectoryContents, + createDirectoryHierarchy, doesDirNameExist, prefixUnderscore, + unknownFlagErr, unknownFlagsErr, missingArgErr, + later, handleDyn, handle, + split, add, addNoDups, + Suffix, splitFilename, getFileSuffix, + splitFilename3, remove_suffix, split_longest_prefix, + replaceFilenameSuffix, directoryOf, replaceFilenameDirectory, + remove_spaces, escapeSpaces, + ) where #include "../includes/config.h" #include "HsVersions.h" @@ -38,6 +48,7 @@ getOptionsFromSource file catchJust ioErrors (look h `finally` hClose h) (\e -> if isEOFError e then return [] else ioError e) where + look h = do l' <- hGetLine h let l = remove_spaces l' @@ -104,14 +115,6 @@ unknownFlagsErr fs = throwDyn (UsageError ("unrecognised flags: " ++ unwords fs) missingArgErr :: String -> a missingArgErr f = throwDyn (UsageError ("missing argument for flag: " ++ f)) -my_partition :: (a -> Maybe b) -> [a] -> ([(a,b)],[a]) -my_partition _ [] = ([],[]) -my_partition p (a:as) - = let (bs,cs) = my_partition p as in - case p a of - Nothing -> (bs,a:cs) - Just b -> ((a,b):bs,cs) - later = flip finally handleDyn :: Typeable ex => (ex -> IO a) -> IO a -> IO a -- 1.7.10.4