Patch for ghci/missing hCloses

Volker Stolz stolz at I2.Informatik.RWTH-Aachen.DE
Mon Apr 30 08:45:37 EDT 2001


The following patch contains two gratuitious hClose statements which
are missing (indepentdant from the previous .ghci-patch).
-- 
Abstrakte Syntaxträume.
Volker Stolz * stolz at i2.informatik.rwth-aachen.de * PGP + S/MIME
-------------- next part --------------
--- InteractiveUI.orig	Mon Apr 30 09:41:28 2001
+++ InteractiveUI.hs	Mon Apr 30 13:38:34 2001
@@ -151,7 +151,7 @@
   dot_ghci <- io (IO.try (openFile "./.ghci" ReadMode))
   case dot_ghci of
 	Left e -> return ()
-	Right hdl -> fileLoop hdl False
+	Right hdl -> fileLoop hdl False >> io (IO.try (hClose hdl)) >> return ()
   
   -- read in ~/.ghci
   home <- io (IO.try (getEnv "HOME"))
@@ -163,7 +163,7 @@
   	  dot_ghci <- io (IO.try (openFile (dir ++ "/.ghci") ReadMode))
   	  case dot_ghci of
   	     Left e -> return ()
-  	     Right hdl -> fileLoop hdl False
+  	     Right hdl -> fileLoop hdl False >> io (IO.try (hClose hdl)) >> return ()
 
   -- read commands from stdin
 #ifndef NO_READLINE


More information about the Glasgow-haskell-bugs mailing list