[commit: ghc] master: Remove a use of printf (bd9e029)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/bd9e029927b25274f574104d837de0028e45a3d6

>---------------------------------------------------------------

commit bd9e029927b25274f574104d837de0028e45a3d6
Author: Ian Lynagh <[email protected]>
Date:   Thu Nov 29 21:32:09 2012 +0000

    Remove a use of printf
    
    It looks like it would fail anyway, as it 'show'ed its argument before
    passing it on to printf.

>---------------------------------------------------------------

 compiler/ghci/LibFFI.hsc |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/compiler/ghci/LibFFI.hsc b/compiler/ghci/LibFFI.hsc
index 7137099..c939801 100644
--- a/compiler/ghci/LibFFI.hsc
+++ b/compiler/ghci/LibFFI.hsc
@@ -21,7 +21,6 @@ import DynFlags
 import Control.Monad
 import Foreign
 import Foreign.C
-import Text.Printf
 
 ----------------------------------------------------------------------------
 
@@ -46,7 +45,7 @@ prepForeignCall dflags cconv arg_types result_type
     r <- ffi_prep_cif cif abi (fromIntegral n_args) res_ty arg_arr
     if (r /= fFI_OK)
        then throwGhcException (InstallationError
-                        (printf "prepForeignCallFailed: %d" (show r)))
+                                   ("prepForeignCallFailed: " ++ show r))
        else return cif
 
 convToABI :: CCallConv -> C_ffi_abi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.