Commit eb5ba64d authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Give seqId the right type

parent 96ba2fb2
......@@ -945,10 +945,10 @@ seqId = pcMiscPrelId seqName ty info
`setSpecInfo` mkSpecInfo [seq_cast_rule]
ty = mkForAllTys [alphaTyVar,openBetaTyVar]
(mkFunTy alphaTy (mkFunTy openBetaTy openBetaTy))
[x,y] = mkTemplateLocals [alphaTy, openBetaTy]
rhs = mkLams [alphaTyVar,openBetaTyVar,x,y] (Case (Var x) x openBetaTy [(DEFAULT, [], Var y)])
ty = mkForAllTys [alphaTyVar,argBetaTyVar]
(mkFunTy alphaTy (mkFunTy argBetaTy argBetaTy))
[x,y] = mkTemplateLocals [alphaTy, argBetaTy]
rhs = mkLams [alphaTyVar,argBetaTyVar,x,y] (Case (Var x) x argBetaTy [(DEFAULT, [], Var y)])
-- See Note [Built-in RULES for seq]
seq_cast_rule = BuiltinRule { ru_name = fsLit "seq of cast"
......
......@@ -12,7 +12,7 @@ module TysPrim(
alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
alphaTy, betaTy, gammaTy, deltaTy,
openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars,
argAlphaTy, argAlphaTyVar,
argAlphaTy, argAlphaTyVar, argBetaTy, argBetaTyVar,
primTyCons,
......@@ -183,10 +183,11 @@ openAlphaTy, openBetaTy :: Type
openAlphaTy = mkTyVarTy openAlphaTyVar
openBetaTy = mkTyVarTy openBetaTyVar
argAlphaTyVar :: TyVar
(argAlphaTyVar : _) = tyVarList argTypeKind
argAlphaTy :: Type
argAlphaTyVar, argBetaTyVar :: TyVar
(argAlphaTyVar : argBetaTyVar : _) = tyVarList argTypeKind
argAlphaTy, argBetaTy :: Type
argAlphaTy = mkTyVarTy argAlphaTyVar
argBetaTy = mkTyVarTy argBetaTyVar
\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