Skip to content
Snippets Groups Projects
Commit 9900ff5e authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

[project @ 2000-04-19 16:40:53 by simonpj]

- Fix foreign export dynamic wibble (reported by Sven)
parent 8df10160
No related merge requests found
...@@ -194,7 +194,7 @@ dsFExport :: Id ...@@ -194,7 +194,7 @@ dsFExport :: Id
, SDoc , SDoc
, 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 = -- BUILD THE returnIO WRAPPER, if necessary
-- Look at the result type of the exported function, orig_res_ty -- Look at the result type of the exported function, orig_res_ty
-- If it's IO t, return (\x.x, IO t, t) -- If it's IO t, return (\x.x, IO t, t)
...@@ -236,7 +236,7 @@ dsFExport i ty mod_name ext_name cconv isDyn ...@@ -236,7 +236,7 @@ dsFExport i ty mod_name ext_name cconv isDyn
in in
returnDs (stbl_value, stbl_app, stbl_ptr) returnDs (stbl_value, stbl_app, stbl_ptr)
else else
returnDs (i, returnDs (fn_id,
\ body -> body, \ body -> body,
panic "stbl_ptr" -- should never be touched. panic "stbl_ptr" -- should never be touched.
)) `thenDs` \ (i, getFun_wrapper, stbl_ptr) -> )) `thenDs` \ (i, getFun_wrapper, stbl_ptr) ->
...@@ -259,7 +259,7 @@ dsFExport i ty mod_name ext_name cconv isDyn ...@@ -259,7 +259,7 @@ dsFExport i ty mod_name ext_name cconv isDyn
f_helper_glob = mkVanillaId helper_name helper_ty f_helper_glob = mkVanillaId helper_name helper_ty
where where
name = idName i name = idName fn_id
mod mod
| isLocalName name = mod_name | isLocalName name = mod_name
| otherwise = nameModule name | otherwise = nameModule name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment