summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin/PrimOps.hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2021-06-03 14:17:52 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-04 12:44:19 -0400
commit733757adb54eccdb4428e5ca4b2d896804bf5965 (patch)
tree6542f3d992d0e5d1a95665597c2d13cba9e95fec /compiler/GHC/Builtin/PrimOps.hs
parentf1b748b491dc49cfbe698cd790610ca21ae21ee7 (diff)
downloadhaskell-733757adb54eccdb4428e5ca4b2d896804bf5965.tar.gz
Make some simple primops levity-polymorphic
Fixes #17817
Diffstat (limited to 'compiler/GHC/Builtin/PrimOps.hs')
-rw-r--r--compiler/GHC/Builtin/PrimOps.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Builtin/PrimOps.hs b/compiler/GHC/Builtin/PrimOps.hs
index bbedb6f2c8..067f0e0d7c 100644
--- a/compiler/GHC/Builtin/PrimOps.hs
+++ b/compiler/GHC/Builtin/PrimOps.hs
@@ -109,14 +109,14 @@ data PrimOpInfo
= Compare OccName -- string :: T -> T -> Int#
Type
| GenPrimOp OccName -- string :: \/a1..an . T1 -> .. -> Tk -> T
- [TyVar]
+ [TyVarBinder]
[Type]
Type
mkCompare :: FastString -> Type -> PrimOpInfo
mkCompare str ty = Compare (mkVarOccFS str) ty
-mkGenPrimOp :: FastString -> [TyVar] -> [Type] -> Type -> PrimOpInfo
+mkGenPrimOp :: FastString -> [TyVarBinder] -> [Type] -> Type -> PrimOpInfo
mkGenPrimOp str tvs tys ty = GenPrimOp (mkVarOccFS str) tvs tys ty
{-
@@ -607,7 +607,7 @@ primOpType op
Compare _occ ty -> compare_fun_ty ty
GenPrimOp _occ tyvars arg_tys res_ty ->
- mkSpecForAllTys tyvars (mkVisFunTysMany arg_tys res_ty)
+ mkForAllTys tyvars (mkVisFunTysMany arg_tys res_ty)
primOpResultType :: PrimOp -> Type
primOpResultType op
@@ -722,7 +722,7 @@ isComparisonPrimOp op = case primOpInfo op of
-- (type variables, argument types, result type)
-- It also gives arity, strictness info
-primOpSig :: PrimOp -> ([TyVar], [Type], Type, Arity, DmdSig)
+primOpSig :: PrimOp -> ([TyVarBinder], [Type], Type, Arity, DmdSig)
primOpSig op
= (tyvars, arg_tys, res_ty, arity, primOpStrictness op arity)
where