X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcType.lhs;h=dcc51efaa3036f30d9ad753c67d016792df6e72a;hp=0025a5e685cca15dca7f08012dbdbd3f0d1f173d;hb=a6f2d598e1e7760d334d1b5ea0b7745e66835e11;hpb=896135d0231f798f264548f5935223d142e718a7 diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index 0025a5e..dcc51ef 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -1416,7 +1416,7 @@ legalFFITyCon tc marshalableTyCon :: DynFlags -> TyCon -> Bool marshalableTyCon dflags tc - = (dopt Opt_UnliftedFFITypes dflags + = (xopt Opt_UnliftedFFITypes dflags && isUnLiftedTyCon tc && not (isUnboxedTupleTyCon tc) && case tyConPrimRep tc of -- Note [Marshalling VoidRep] @@ -1442,7 +1442,7 @@ legalFIPrimArgTyCon :: DynFlags -> TyCon -> Bool -- Strictly speaking it is unnecessary to ban unboxed tuples here since -- currently they're of the wrong kind to use in function args anyway. legalFIPrimArgTyCon dflags tc - = dopt Opt_UnliftedFFITypes dflags + = xopt Opt_UnliftedFFITypes dflags && isUnLiftedTyCon tc && not (isUnboxedTupleTyCon tc) @@ -1450,7 +1450,7 @@ legalFIPrimResultTyCon :: DynFlags -> TyCon -> Bool -- Check result type of 'foreign import prim'. Allow simple unlifted -- types and also unboxed tuple result types '... -> (# , , #)' legalFIPrimResultTyCon dflags tc - = dopt Opt_UnliftedFFITypes dflags + = xopt Opt_UnliftedFFITypes dflags && isUnLiftedTyCon tc && (isUnboxedTupleTyCon tc || case tyConPrimRep tc of -- Note [Marshalling VoidRep]