Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

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

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

commit c2f9b74c234fe68637275351674619b8c525291d
Author: Ian Lynagh <i...@well-typed.com>
Date:   Thu Nov 29 21:25:59 2012 +0000

    Small refactoring

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

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

diff --git a/compiler/ghci/LibFFI.hsc b/compiler/ghci/LibFFI.hsc
index 73b8095..7137099 100644
--- a/compiler/ghci/LibFFI.hsc
+++ b/compiler/ghci/LibFFI.hsc
@@ -16,9 +16,9 @@ module LibFFI (
 import TyCon
 import ForeignCall
 import Panic
--- import Outputable
 import DynFlags
 
+import Control.Monad
 import Foreign
 import Foreign.C
 import Text.Printf
@@ -38,8 +38,8 @@ prepForeignCall dflags cconv arg_types result_type
   = do
     let n_args = length arg_types
     arg_arr <- mallocArray n_args
-    let init_arg (ty,n) = pokeElemOff arg_arr n (primRepToFFIType dflags ty)
-    mapM_ init_arg (zip arg_types [0..])
+    let init_arg ty n = pokeElemOff arg_arr n (primRepToFFIType dflags ty)
+    zipWithM_ init_arg arg_types [0..]
     cif <- mallocBytes (#const sizeof(ffi_cif))
     let abi = convToABI cconv
     let res_ty = primRepToFFIType dflags result_type



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to