From: simonmar Date: Tue, 27 Jul 1999 11:09:31 +0000 (+0000) Subject: [project @ 1999-07-27 11:09:31 by simonmar] X-Git-Tag: Approximately_9120_patches~5947 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=3c40d60230391949db9de4f1ffe3b8a61ce72090 [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. --- 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}