X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcForeign.lhs;h=c8d61d20df445308ac253c313907a711fd0b8a4b;hb=b732f90c9e6b1c0177e04a5f84abac7f50cca4e4;hp=6c51aee7c2514e9cf84891c0076403f7f9c80fdb;hpb=e21b5f3296615c0daf6c2d602ac91b76a84ad3c1;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcForeign.lhs b/ghc/compiler/typecheck/TcForeign.lhs index 6c51aee..c8d61d2 100644 --- a/ghc/compiler/typecheck/TcForeign.lhs +++ b/ghc/compiler/typecheck/TcForeign.lhs @@ -167,11 +167,13 @@ checkForeignImport is_dynamic is_safe ty args res case args of [] -> check False (illegalForeignTyErr True{-Arg-} ty) (x:xs) -> + getDOptsTc `thenTc` \ dflags -> check (isFFIDynArgumentTy x) (illegalForeignTyErr True{-Arg-} ty) `thenTc_` - mapTc (checkForeignArg (isFFIArgumentTy is_safe)) xs `thenTc_` + mapTc (checkForeignArg (isFFIArgumentTy dflags is_safe)) xs `thenTc_` checkForeignRes True {-NonIO ok-} isFFIResultTy res | otherwise = - mapTc (checkForeignArg (isFFIArgumentTy is_safe)) args `thenTc_` + getDOptsTc `thenTc` \ dflags -> + mapTc (checkForeignArg (isFFIArgumentTy dflags is_safe)) args `thenTc_` checkForeignRes True {-NonIO ok-} isFFIResultTy res checkForeignExport :: Bool -> Type -> [Type] -> Type -> TcM ()