X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcType.lhs;h=531709af92ec7f293d47188b0043345a88857aba;hb=c92ddc55847b34d45f188f7c62092d69915a7a7d;hp=fa4d84f564a9272513b315d1c1f9072a389037ad;hpb=b3e4cb91c4386c4d1456b896da1abb964f2124a6;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcType.lhs b/ghc/compiler/typecheck/TcType.lhs index fa4d84f..531709a 100644 --- a/ghc/compiler/typecheck/TcType.lhs +++ b/ghc/compiler/typecheck/TcType.lhs @@ -829,8 +829,7 @@ legalFEArgTyCon :: TyCon -> Bool -- bytearrays from a _ccall_ / foreign declaration -- (or be passed them as arguments in foreign exported functions). legalFEArgTyCon tc - | getUnique tc `elem` [ foreignObjTyConKey, - byteArrayTyConKey, mutableByteArrayTyConKey ] + | getUnique tc `elem` [ byteArrayTyConKey, mutableByteArrayTyConKey ] = False -- It's also illegal to make foreign exports that take unboxed -- arguments. The RTS API currently can't invoke such things. --SDM 7/2000 @@ -840,16 +839,14 @@ legalFEArgTyCon tc legalFIResultTyCon :: DynFlags -> TyCon -> Bool legalFIResultTyCon dflags tc | getUnique tc `elem` - [ foreignObjTyConKey, - byteArrayTyConKey, mutableByteArrayTyConKey ] = False + [ byteArrayTyConKey, mutableByteArrayTyConKey ] = False | tc == unitTyCon = True | otherwise = marshalableTyCon dflags tc legalFEResultTyCon :: TyCon -> Bool legalFEResultTyCon tc | getUnique tc `elem` - [ foreignObjTyConKey, - byteArrayTyConKey, mutableByteArrayTyConKey ] = False + [ byteArrayTyConKey, mutableByteArrayTyConKey ] = False | tc == unitTyCon = True | otherwise = boxedMarshalableTyCon tc @@ -872,7 +869,7 @@ boxedMarshalableTyCon tc , word32TyConKey, word64TyConKey , floatTyConKey, doubleTyConKey , addrTyConKey, ptrTyConKey, funPtrTyConKey - , charTyConKey, foreignObjTyConKey + , charTyConKey , stablePtrTyConKey , byteArrayTyConKey, mutableByteArrayTyConKey , boolTyConKey