projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2002-08-28 09:24:15 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
main
/
CodeOutput.lhs
diff --git
a/ghc/compiler/main/CodeOutput.lhs
b/ghc/compiler/main/CodeOutput.lhs
index
3953410
..
166c099
100644
(file)
--- a/
ghc/compiler/main/CodeOutput.lhs
+++ b/
ghc/compiler/main/CodeOutput.lhs
@@
-4,7
+4,7
@@
\section{Code output phase}
\begin{code}
\section{Code output phase}
\begin{code}
-module CodeOutput( codeOutput ) where
+module CodeOutput( codeOutput, outputForeignStubs ) where
#include "HsVersions.h"
#include "HsVersions.h"
@@
-93,12
+93,7
@@
codeOutput dflags mod_name tycons core_binds stg_binds
}
doOutput :: String -> (Handle -> IO ()) -> IO ()
}
doOutput :: String -> (Handle -> IO ()) -> IO ()
-doOutput filenm io_action
- = (do handle <- openFile filenm WriteMode
- io_action handle
- hClose handle)
- `catch` (\err -> pprPanic "Failed to open or write code output file"
- (text filenm))
+doOutput filenm io_action = bracket (openFile filenm WriteMode) hClose io_action
\end{code}
\end{code}