X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FDsForeign.lhs;h=9ad1d487912ee8f60e3767d3359f992b186d8760;hb=3629180909c5ffcc9056b8fca262021021dbfab6;hp=d7096ae7caa541cd5d8ffd16f1e0bb1714c871e8;hpb=aee37b142fea58ec68dc6fa3d24dc3563f1bdaf6;p=ghc-hetmet.git diff --git a/compiler/deSugar/DsForeign.lhs b/compiler/deSugar/DsForeign.lhs index d7096ae..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 @@ -656,7 +659,7 @@ primTyDescChar ty WordRep -> unsigned_word Int64Rep -> 'L' Word64Rep -> 'l' - AddrRep -> unsigned_word + AddrRep -> 'p' FloatRep -> 'f' DoubleRep -> 'd' _ -> pprPanic "primTyDescChar" (ppr ty)