Disallow 'ForeignPtr' as an FFI argument type. It has been deprecated
for some time (withForeignPtr is the approved way to pass a
ForeignPtr). The changes I'm about to make to ForeignPtr will stop it
working anyhow.
isFFIArgumentTy, isFFIImportResultTy,
isFFIExportResultTy, isFFILabelTy,
isFFIExternalTy, isFFIDynArgumentTy,
isFFIArgumentTy, isFFIImportResultTy,
isFFIExportResultTy, isFFILabelTy,
isFFIExternalTy, isFFIDynArgumentTy,
- isFFIDynResultTy, isForeignPtrTy
)
import ForeignCall ( CExportSpec(..), CCallTarget(..), CCallConv(..),
isDynamicTarget, isCasmTarget )
)
import ForeignCall ( CExportSpec(..), CCallTarget(..), CCallConv(..),
isDynamicTarget, isCasmTarget )
= mapNF_Tc go tys `thenNF_Tc_`
returnNF_Tc ()
where
= mapNF_Tc go tys `thenNF_Tc_`
returnNF_Tc ()
where
- go ty = check (pred ty) (illegalForeignTyErr argument ty) `thenNF_Tc_`
- warnTc (isForeignPtrTy ty) foreignPtrWarn
- --
- foreignPtrWarn =
- text "`ForeignPtr' as argument type in a foreign import is deprecated"
+ go ty = check (pred ty) (illegalForeignTyErr argument ty)
------------ Checking result types for foreign calls ----------------------
-- Check that the type has the form
------------ Checking result types for foreign calls ----------------------
-- Check that the type has the form