Commit 6157da7b authored by simonmar's avatar simonmar
Browse files

[project @ 2003-04-11 13:04:37 by simonmar]

The Id for a foreign import should be a LocalId, not a GlobalId.
Making it a GlobalId violates the invariant that all Ids defined in
the current module should be LocalIds until CoreTidy.
parent 4e70004b
......@@ -86,10 +86,10 @@ tcFImport fo@(ForeignImport nm hs_ty imp_decl isDeprec src_loc)
-- of the foreign type.
(_, t_ty) = tcSplitForAllTys sig_ty
(arg_tys, res_ty) = tcSplitFunTys t_ty
id = mkVanillaGlobal nm sig_ty noCafIdInfo
-- Foreign-imported things don't neeed zonking etc
-- They are rather like constructors; we make the final
-- Global Id right away.
id = mkLocalId nm sig_ty
-- Use a LocalId to obey the invariant that locally-defined
-- things are LocalIds. However, it does not need zonking,
-- (so TcHsSyn.zonkForeignExports ignores it).
in
tcCheckFIType sig_ty arg_tys res_ty imp_decl `thenM_`
-- can't use sig_ty here because it :: Type and we need HsType Id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment