X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FDsForeign.lhs;h=9ad1d487912ee8f60e3767d3359f992b186d8760;hb=7ba02f08d722982bfdb54c28b8a9cbd49b1fdb5f;hp=05ff8bd9d56c868a26e8818e55801ad5280e109e;hpb=8ded597b532eda747b5d911e6991cdb0013f77a1;p=ghc-hetmet.git diff --git a/compiler/deSugar/DsForeign.lhs b/compiler/deSugar/DsForeign.lhs index 05ff8bd..9ad1d48 100644 --- a/compiler/deSugar/DsForeign.lhs +++ b/compiler/deSugar/DsForeign.lhs @@ -483,14 +483,17 @@ mkFExportCBits c_nm maybe_target arg_htys res_hty is_IO_res_ty cc header_bits = ptext SLIT("extern") <+> fun_proto <> semi + fun_args + | null aug_arg_info = text "void" + | otherwise = hsep $ punctuate comma + $ map (\(nm,ty,_,_) -> ty <+> nm) aug_arg_info + fun_proto | libffi = ptext SLIT("void") <+> ftext c_nm <> parens (ptext SLIT("void *cif STG_UNUSED, void* resp, void** args, void* the_stableptr")) | otherwise - = cResType <+> pprCconv <+> ftext c_nm <> - parens (hsep (punctuate comma (map (\(nm,ty,_,_) -> ty <+> nm) - aug_arg_info))) + = cResType <+> pprCconv <+> ftext c_nm <> parens fun_args -- the target which will form the root of what we ask rts_evalIO to run the_cfun