diff options
author | simonmar <unknown> | 2002-01-22 14:47:52 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-01-22 14:47:52 +0000 |
commit | 46c2362e62e881124ea6d82cee17ffa3b5115088 (patch) | |
tree | 017c5479f44e8314d2e52c3eb0d038b70e28748a /ghc/compiler/main/DriverUtil.hs | |
parent | 33a7aa8bb2584a8e4cb8bdae27f6d56696f2dea5 (diff) | |
download | haskell-46c2362e62e881124ea6d82cee17ffa3b5115088.tar.gz |
[project @ 2002-01-22 14:47:52 by simonmar]
Strip whitespace from the beginning of the line when looking for
OPTIONS pragmas.
Diffstat (limited to 'ghc/compiler/main/DriverUtil.hs')
-rw-r--r-- | ghc/compiler/main/DriverUtil.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index 9901b4665e..0be0937df7 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverUtil.hs,v 1.28 2001/10/11 23:52:51 sof Exp $ +-- $Id: DriverUtil.hs,v 1.29 2002/01/22 14:47:52 simonmar Exp $ -- -- Utils for the driver -- @@ -43,7 +43,8 @@ getOptionsFromSource file (\e -> if isEOFError e then return [] else ioError e) where look h = do - l <- hGetLine h + l' <- hGetLine h + let l = remove_spaces l' case () of () | null l -> look h | prefixMatch "#" l -> look h |