-----------------------------------------------------------------------------
--- $Id: DriverState.hs,v 1.34 2001/03/22 03:51:08 hwloidl Exp $
+-- $Id: DriverState.hs,v 1.37 2001/03/28 11:01:19 simonmar Exp $
--
-- Settings for the driver
--
-- Global compilation flags
-- location of compiler-related files
-GLOBAL_VAR(v_TopDir, clibdir, String)
+GLOBAL_VAR(v_TopDir, error "no TOPDIR", String)
-- Cpp-related flags
v_Hs_source_cpp_opts = global
= do paths <- readIORef ref
writeIORef ref (paths ++ split split_marker path)
+GLOBAL_VAR(v_HCHeader, "", String)
+
-----------------------------------------------------------------------------
-- Packages
addPackage package
= do pkg_details <- readIORef v_Package_details
case lookupPkg package pkg_details of
- Nothing -> throwDyn (OtherError ("unknown package name: " ++ package))
+ Nothing -> throwDyn (CmdLineError ("unknown package name: " ++ package))
Just details -> do
ps <- readIORef v_Packages
unless (package `elem` ps) $ do
return (wayOpts details)
ws -> if not (allowed_combination ws)
- then throwDyn (OtherError $
+ then throwDyn (CmdLineError $
"combination not supported: " ++
foldr1 (\a b -> a ++ '/':b)
(map (wayName . lkupWay) ws))