From: simonmar Date: Tue, 11 Jan 2005 15:22:04 +0000 (+0000) Subject: [project @ 2005-01-11 15:22:04 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1266 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0f18d146b2d564be776f3548cbdc7c6acdec3f9d;p=ghc-hetmet.git [project @ 2005-01-11 15:22:04 by simonmar] fix for parsing OPTIONS pragmas: OPTIONS should be followed by a non-identifier character. --- diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index f759f8b..2cee71d 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $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 -- @@ -25,6 +25,7 @@ module DriverUtil ( import Util import Panic import Config ( cLeadingUnderscore ) +import Ctype import EXCEPTION ( Exception(..), finally, throwDyn, catchDyn, throw ) import qualified EXCEPTION as Exception @@ -66,6 +67,7 @@ getOptionsFromSource file 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