From 9900ff5e7e5fdcd90f3d9e2ae69878e358aed6f0 Mon Sep 17 00:00:00 2001 From: simonpj <unknown> Date: Wed, 19 Apr 2000 16:40:53 +0000 Subject: [PATCH] [project @ 2000-04-19 16:40:53 by simonpj] - Fix foreign export dynamic wibble (reported by Sven) --- ghc/compiler/deSugar/DsForeign.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/deSugar/DsForeign.lhs b/ghc/compiler/deSugar/DsForeign.lhs index b3ca8dbbaec6..65d0607ed7e3 100644 --- a/ghc/compiler/deSugar/DsForeign.lhs +++ b/ghc/compiler/deSugar/DsForeign.lhs @@ -194,7 +194,7 @@ dsFExport :: Id , SDoc , SDoc ) -dsFExport i ty mod_name ext_name cconv isDyn +dsFExport fn_id ty mod_name ext_name cconv isDyn = -- BUILD THE returnIO WRAPPER, if necessary -- Look at the result type of the exported function, orig_res_ty -- If it's IO t, return (\x.x, IO t, t) @@ -236,7 +236,7 @@ dsFExport i ty mod_name ext_name cconv isDyn in returnDs (stbl_value, stbl_app, stbl_ptr) else - returnDs (i, + returnDs (fn_id, \ body -> body, panic "stbl_ptr" -- should never be touched. )) `thenDs` \ (i, getFun_wrapper, stbl_ptr) -> @@ -259,7 +259,7 @@ dsFExport i ty mod_name ext_name cconv isDyn f_helper_glob = mkVanillaId helper_name helper_ty where - name = idName i + name = idName fn_id mod | isLocalName name = mod_name | otherwise = nameModule name -- GitLab