import SMRep
import MachOp
#endif
-import OccName
import Name
import TcType
-import ForeignCall
import DynFlags
import Outputable
import SrcLoc
newUnique `thenM` \ uniq ->
getModule `thenM` \ mod ->
let
- gnm = mkExternalName uniq mod (mkForeignExportOcc (getOccName nm))
- (srcSpanStart loc)
+ gnm = mkExternalName uniq mod (mkForeignExportOcc (getOccName nm)) loc
id = mkExportedLocalId gnm sig_ty
bind = L loc (VarBind id rhs)
in
checkForeignRes non_io_result_ok pred_res_ty ty
-- (IO t) is ok, and so is any newtype wrapping thereof
- | Just (io, res_ty) <- tcSplitIOType_maybe ty,
+ | Just (io, res_ty, _) <- tcSplitIOType_maybe ty,
pred_res_ty res_ty
= returnM ()
case check target of
Nothing -> returnM ()
Just err -> addErrTc (text "Illegal foreign declaration:" <+> err)
-\end{code}
+\end{code}
Calling conventions