-----------------------------------------------------------------------------
--- $Id: DriverUtil.hs,v 1.46 2004/11/09 16:59:31 simonmar Exp $
+-- $Id: DriverUtil.hs,v 1.47 2005/01/11 15:22:04 simonmar Exp $
--
-- Utils for the driver
--
import Util
import Panic
import Config ( cLeadingUnderscore )
+import Ctype
import EXCEPTION ( Exception(..), finally, throwDyn, catchDyn, throw )
import qualified EXCEPTION as Exception
matchOptions s
| Just s1 <- maybePrefixMatch "{-#" s, -- -}
Just s2 <- maybePrefixMatch "OPTIONS" (remove_spaces s1),
+ not (is_ident (head s2)),
Just s3 <- maybePrefixMatch "}-#" (reverse s2)
= Just (reverse s3)
| otherwise