projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Inline implication constraints
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcType.lhs
diff --git
a/compiler/typecheck/TcType.lhs
b/compiler/typecheck/TcType.lhs
index
388a28d
..
636ee0e
100644
(file)
--- a/
compiler/typecheck/TcType.lhs
+++ b/
compiler/typecheck/TcType.lhs
@@
-38,7
+38,7
@@
module TcType (
isImmutableTyVar, isSkolemTyVar, isMetaTyVar, isBoxyTyVar,
isSigTyVar, isExistentialTyVar, isTyConableTyVar,
metaTvRef,
isImmutableTyVar, isSkolemTyVar, isMetaTyVar, isBoxyTyVar,
isSigTyVar, isExistentialTyVar, isTyConableTyVar,
metaTvRef,
- isFlexi, isIndirect,
+ isFlexi, isIndirect, isRuntimeUnk, isUnk,
--------------------------------
-- Builders
--------------------------------
-- Builders
@@
-457,7
+457,7
@@
pprSkolTvBinding tv
ppr_details (MetaTv (SigTv info) _) = ppr_skol info
ppr_details (SkolemTv info) = ppr_skol info
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,
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,
@@
-556,6
+556,16
@@
isFlexi other = False
isIndirect (Indirect _) = True
isIndirect 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}
\end{code}
@@
-1276,6
+1286,7
@@
legalFFITyCon tc
marshalableTyCon dflags tc
= (dopt Opt_UnliftedFFITypes dflags
&& isUnLiftedTyCon tc
marshalableTyCon dflags tc
= (dopt Opt_UnliftedFFITypes dflags
&& isUnLiftedTyCon tc
+ && not (isUnboxedTupleTyCon tc)
&& case tyConPrimRep tc of -- Note [Marshalling VoidRep]
VoidRep -> False
other -> True)
&& case tyConPrimRep tc of -- Note [Marshalling VoidRep]
VoidRep -> False
other -> True)