Commit 176b98e2 authored by rrt's avatar rrt
Browse files

[project @ 2001-06-27 10:14:13 by rrt]

Close file after reading OPTIONS pragma
parent 70dac7c7
-----------------------------------------------------------------------------
-- $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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment