From 1f657d314146ad9fed38abff5f1f1e8d3671401e Mon Sep 17 00:00:00 2001 From: rrt Date: Wed, 20 Dec 2000 15:44:01 +0000 Subject: [PATCH] [project @ 2000-12-20 15:44:01 by rrt] Allow multiple OPTIONS pragmas for GreenCard's benefit. --- ghc/compiler/main/DriverUtil.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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]+(.*)#-\\}" -- -} -- 1.7.10.4