X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcType.lhs;h=636ee0ea696c012a1822aa3323ea2efafc3dea38;hb=3f1b316d7035c55cd712cd39a9981339bcef2e8c;hp=a27a0c5da79acf8df48e8bebdcf7c791e29bb81c;hpb=5822cb8d13aa3c05d2b46b4510c13d94b902eb21;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index a27a0c5..636ee0e 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -15,6 +15,13 @@ The "tc" prefix is for "TypeChecker", because the type checker is the principal client. \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module TcType ( -------------------------------- -- Types @@ -31,7 +38,7 @@ module TcType ( isImmutableTyVar, isSkolemTyVar, isMetaTyVar, isBoxyTyVar, isSigTyVar, isExistentialTyVar, isTyConableTyVar, metaTvRef, - isFlexi, isIndirect, + isFlexi, isIndirect, isRuntimeUnk, isUnk, -------------------------------- -- Builders @@ -450,7 +457,7 @@ pprSkolTvBinding tv ppr_details (MetaTv (SigTv info) _) = ppr_skol info ppr_details (SkolemTv info) = ppr_skol info - ppr_skol UnkSkol = empty -- Unhelpful; omit + ppr_skol UnkSkol = ptext SLIT("is an unknown type variable") -- Unhelpful ppr_skol RuntimeUnkSkol = ptext SLIT("is an unknown runtime type") ppr_skol info = sep [ptext SLIT("is a rigid type variable bound by"), sep [pprSkolInfo info, @@ -549,6 +556,16 @@ isFlexi other = False isIndirect (Indirect _) = True isIndirect other = False + +isRuntimeUnk :: TyVar -> Bool +isRuntimeUnk x | isTcTyVar x + , SkolemTv RuntimeUnkSkol <- tcTyVarDetails x = True + | otherwise = False + +isUnk :: TyVar -> Bool +isUnk x | isTcTyVar x + , SkolemTv UnkSkol <- tcTyVarDetails x = True + | otherwise = False \end{code} @@ -1269,6 +1286,7 @@ legalFFITyCon tc marshalableTyCon dflags tc = (dopt Opt_UnliftedFFITypes dflags && isUnLiftedTyCon tc + && not (isUnboxedTupleTyCon tc) && case tyConPrimRep tc of -- Note [Marshalling VoidRep] VoidRep -> False other -> True)