From: rrt Date: Wed, 27 Jun 2001 10:14:13 +0000 (+0000) Subject: [project @ 2001-06-27 10:14:13 by rrt] X-Git-Tag: Approximately_9120_patches~1706 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=176b98e2b65015abf2d19477c0050a3824a73f8c;p=ghc-hetmet.git [project @ 2001-06-27 10:14:13 by rrt] Close file after reading OPTIONS pragma --- diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index 77c0f4c..e0141ce 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverUtil.hs,v 1.24 2001/06/14 12:50:06 simonpj Exp $ +-- $Id: DriverUtil.hs,v 1.25 2001/06/27 10:14:13 rrt Exp $ -- -- Utils for the driver -- @@ -38,7 +38,7 @@ getOptionsFromSource -> IO [String] -- options, if any getOptionsFromSource file = do h <- openFile file ReadMode - catchJust ioErrors (look h) + catchJust ioErrors (look h `finally` hClose h) (\e -> if isEOFError e then return [] else ioError e) where look h = do