-----------------------------------------------------------------------------
--- $Id: DriverUtil.hs,v 1.25 2001/06/27 10:14:13 rrt Exp $
+-- $Id: DriverUtil.hs,v 1.27 2001/08/16 11:06:10 simonmar Exp $
--
-- Utils for the driver
--
import Util
import Panic
+import Config ( cLeadingUnderscore )
import IOExts
import Exception
softGetDirectoryContents d
= IO.catch (getDirectoryContents d)
- (\_ -> do hPutStr stderr
+ (\_ -> do hPutStrLn stderr
("WARNING: error while reading directory " ++ d)
return []
)
-----------------------------------------------------------------------------
+-- Prefixing underscore to linker-level names
+prefixUnderscore :: String -> String
+prefixUnderscore
+ | cLeadingUnderscore == "YES" = ('_':)
+ | otherwise = id
+
+-----------------------------------------------------------------------------
-- Utils
unknownFlagErr :: String -> a