From 3c40d60230391949db9de4f1ffe3b8a61ce72090 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 27 Jul 1999 11:09:31 +0000 Subject: [PATCH] [project @ 1999-07-27 11:09:31 by simonmar] Allow mkWeak# to take an unlifted type as the key argument. The intention is that boxed-but-unlifted types can be used as keys, not unlifted types in general but there's no way to enforce this at the moment. --- ghc/compiler/prelude/PrimOp.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/prelude/PrimOp.lhs b/ghc/compiler/prelude/PrimOp.lhs index 6634fe8..24bd867 100644 --- a/ghc/compiler/prelude/PrimOp.lhs +++ b/ghc/compiler/prelude/PrimOp.lhs @@ -35,7 +35,7 @@ import RdrName ( RdrName, mkRdrQual ) import OccName ( OccName, pprOccName, mkSrcVarOcc ) import TyCon ( TyCon, tyConArity ) import Type ( Type, mkForAllTys, mkForAllTy, mkFunTy, mkFunTys, mkTyVarTys, - mkTyConTy, mkTyConApp, typePrimRep, + mkTyConTy, mkTyConApp, typePrimRep,mkTyVarTy, splitFunTy_maybe, splitAlgTyConApp_maybe, splitTyConApp_maybe, UsageAnn(..), mkUsgTy ) @@ -1639,8 +1639,8 @@ In practice, you'll use the higher-level \begin{code} primOpInfo MkWeakOp - = mkGenPrimOp SLIT("mkWeak#") [alphaTyVar, betaTyVar, gammaTyVar] - [alphaTy, betaTy, gammaTy, realWorldStatePrimTy] + = mkGenPrimOp SLIT("mkWeak#") [openAlphaTyVar, betaTyVar, gammaTyVar] + [mkTyVarTy openAlphaTyVar, betaTy, gammaTy, realWorldStatePrimTy] (unboxedPair [realWorldStatePrimTy, mkWeakPrimTy betaTy]) \end{code} -- 1.7.10.4