Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
dc4ae7b7
Commit
dc4ae7b7
authored
May 03, 2012
by
Ian Lynagh
Browse files
Check the calling convention of foreign imported labels is supported
Fixes 2276_ghci on Win64
parent
4202879d
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcForeign.lhs
View file @
dc4ae7b7
...
...
@@ -203,12 +203,14 @@ tcFImport d = pprPanic "tcFImport" (ppr d)
\begin{code}
tcCheckFIType :: Type -> [Type] -> Type -> ForeignImport -> TcM ForeignImport
tcCheckFIType sig_ty arg_tys res_ty
idecl@
(CImport
_ _ _
(CLabel _))
tcCheckFIType sig_ty arg_tys res_ty (CImport
cconv safety mh l@
(CLabel _))
= ASSERT( null arg_tys )
do { checkCg checkCOrAsmOrLlvmOrInterp
; check (isFFILabelTy res_ty) (illegalForeignTyErr empty sig_ty)
; return idecl } -- NB check res_ty not sig_ty!
-- In case sig_ty is (forall a. ForeignPtr a)
do checkCg checkCOrAsmOrLlvmOrInterp
-- NB check res_ty not sig_ty!
-- In case sig_ty is (forall a. ForeignPtr a)
check (isFFILabelTy res_ty) (illegalForeignTyErr empty sig_ty)
cconv' <- checkCConv cconv
return (CImport cconv' safety mh l)
tcCheckFIType sig_ty arg_tys res_ty (CImport cconv safety mh CWrapper) = do
-- Foreign wrapper (former f.e.d.)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment