From: simonmar Date: Tue, 12 Dec 2000 13:27:18 +0000 (+0000) Subject: [project @ 2000-12-12 13:27:18 by simonmar] X-Git-Tag: Approximately_9120_patches~3121 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=57169c9e8ddc449919490158eb852eb5aad86138;p=ghc-hetmet.git [project @ 2000-12-12 13:27:18 by simonmar] Make the foreign export dynamic helper function "exported", so it doesn't get thrown away. --- diff --git a/ghc/compiler/deSugar/DsForeign.lhs b/ghc/compiler/deSugar/DsForeign.lhs index 65ddba6..ebc1e6d 100644 --- a/ghc/compiler/deSugar/DsForeign.lhs +++ b/ghc/compiler/deSugar/DsForeign.lhs @@ -20,9 +20,10 @@ import HsDecls ( extNameStatic ) import CallConv import TcHsSyn ( TypecheckedForeignDecl ) import CoreUtils ( exprType, mkInlineMe ) -import Id ( Id, idType, idName, mkVanillaId, mkSysLocal, +import Id ( Id, idType, idName, mkId, mkSysLocal, setInlinePragma ) -import IdInfo ( neverInlinePrag ) +import IdInfo ( neverInlinePrag, vanillaIdInfo, IdFlavour(..), + setFlavourInfo ) import Literal ( Literal(..) ) import Module ( Module, moduleUserString ) import Name ( mkGlobalName, nameModule, nameOccName, getOccString, @@ -259,7 +260,8 @@ dsFExport fn_id ty mod_name ext_name cconv isDyn helper_ty = mkForAllTys tvs $ mkFunTys wrapper_arg_tys io_res_ty - f_helper_glob = mkVanillaId helper_name helper_ty + f_helper_glob = mkId helper_name helper_ty + (vanillaIdInfo `setFlavourInfo` ExportedId) where name = idName fn_id mod