Skip to content
Snippets Groups Projects
Commit 3c40d602 authored by Simon Marlow's avatar Simon Marlow
Browse files

[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.
parent 16aca80e
No related merge requests found
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment