X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcForeign.lhs;h=1a8a3f354c12fdfc832cc0a631830c4c0b414bde;hp=23756d97c351b99de50b5f66d827140595a3455d;hb=f73446118d7168e238868b591be748ab0997045c;hpb=cbbee4e8727c583daf32d9bf17f00afaa839ef10 diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs index 23756d9..1a8a3f3 100644 --- a/compiler/typecheck/TcForeign.lhs +++ b/compiler/typecheck/TcForeign.lhs @@ -154,8 +154,8 @@ tcCheckFIType sig_ty arg_tys res_ty idecl@(CImport cconv safety _ _ (CFunction t | cconv == PrimCallConv = do checkCg (checkCOrAsmOrDotNetOrInterp) checkCTarget target - check (safety == PlayRisky) - (text "A `foreign import prim' must always be annotated as `unsafe'") + check (playSafe safety) + (text "The safe/unsafe annotation should not be used with `foreign import prim'.") dflags <- getDOpts checkForeignArgs (isFFIPrimArgumentTy dflags) arg_tys -- prim import result is more liberal, allows (#,,#)