From: rrt Date: Wed, 20 Dec 2000 15:44:01 +0000 (+0000) Subject: [project @ 2000-12-20 15:44:01 by rrt] X-Git-Tag: Approximately_9120_patches~3014 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1f657d314146ad9fed38abff5f1f1e8d3671401e;p=ghc-hetmet.git [project @ 2000-12-20 15:44:01 by rrt] Allow multiple OPTIONS pragmas for GreenCard's benefit. --- diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index e1311fe..91fd3ca 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverUtil.hs,v 1.15 2000/12/12 14:35:08 simonmar Exp $ +-- $Id: DriverUtil.hs,v 1.16 2000/12/20 15:44:01 rrt Exp $ -- -- Utils for the driver -- @@ -60,7 +60,8 @@ getOptionsFromSource file | prefixMatch "#" l -> look h | prefixMatch "{-# LINE" l -> look h -- -} | Just (opts:_) <- matchRegex optionRegex l - -> return (words opts) + -> do rest <- look h + return (words opts ++ rest) | otherwise -> return [] optionRegex = mkRegex "\\{-#[ \t]+OPTIONS[ \t]+(.*)#-\\}" -- -}