Commit 5e3c9a59 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Give the correct kind to unsafeCoerce#

parent ebd13958
......@@ -920,11 +920,11 @@ unsafeCoerceId
info = noCafIdInfo `setUnfoldingInfo` mkCompulsoryUnfolding rhs
ty = mkForAllTys [openAlphaTyVar,openBetaTyVar]
(mkFunTy openAlphaTy openBetaTy)
[x] = mkTemplateLocals [openAlphaTy]
rhs = mkLams [openAlphaTyVar,openBetaTyVar,x] $
Cast (Var x) (mkUnsafeCoercion openAlphaTy openBetaTy)
ty = mkForAllTys [argAlphaTyVar,openBetaTyVar]
(mkFunTy argAlphaTy openBetaTy)
[x] = mkTemplateLocals [argAlphaTy]
rhs = mkLams [argAlphaTyVar,openBetaTyVar,x] $
Cast (Var x) (mkUnsafeCoercion argAlphaTy openBetaTy)
------------------------------------------------
nullAddrId :: Id
......
......@@ -12,6 +12,7 @@ module TysPrim(
alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
alphaTy, betaTy, gammaTy, deltaTy,
openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars,
argAlphaTy, argAlphaTyVar,
primTyCons,
......@@ -180,7 +181,12 @@ openAlphaTyVars@(openAlphaTyVar:openBetaTyVar:_) = tyVarList openTypeKind
openAlphaTy, openBetaTy :: Type
openAlphaTy = mkTyVarTy openAlphaTyVar
openBetaTy = mkTyVarTy openBetaTyVar
openBetaTy = mkTyVarTy openBetaTyVar
argAlphaTyVar :: TyVar
(argAlphaTyVar : _) = tyVarList argTypeKind
argAlphaTy :: Type
argAlphaTy = mkTyVarTy argAlphaTyVar
\end{code}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment