From: sewardj Date: Tue, 21 Nov 2000 14:43:30 +0000 (+0000) Subject: [project @ 2000-11-21 14:43:30 by sewardj] X-Git-Tag: Approximately_9120_patches~3283 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7ed8079c3ba2498a02065105d40030f4f3be4217;p=ghc-hetmet.git [project @ 2000-11-21 14:43:30 by sewardj] Return the correct file name for .stub_[ch] files. --- diff --git a/ghc/compiler/main/CodeOutput.lhs b/ghc/compiler/main/CodeOutput.lhs index 0d865b9..896e151 100644 --- a/ghc/compiler/main/CodeOutput.lhs +++ b/ghc/compiler/main/CodeOutput.lhs @@ -177,9 +177,9 @@ outputForeignStubs dflags c_code h_code -- turn out to be empty, in which case no file should be created. outputForeignStubs_help is_header "" = return Nothing outputForeignStubs_help is_header doc_str - = newTempName suffix >>= \ fname -> - writeFile fname (include_prefix ++ doc_str) >> - return (Just suffix) + = do fname <- newTempName suffix + writeFile fname (include_prefix ++ doc_str) + return (Just fname) where suffix | is_header = "h_stub"