From 39ce3c68d081c7219c5a6ccc8d0a394903f5c336 Mon Sep 17 00:00:00 2001 From: sof Date: Sun, 8 Nov 1998 17:08:34 +0000 Subject: [PATCH] [project @ 1998-11-08 17:08:34 by sof] primOpInfo WriteOffAddrOp fixed --- ghc/compiler/prelude/PrimOp.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/prelude/PrimOp.lhs b/ghc/compiler/prelude/PrimOp.lhs index 71ad733..836e8c4 100644 --- a/ghc/compiler/prelude/PrimOp.lhs +++ b/ghc/compiler/prelude/PrimOp.lhs @@ -1213,13 +1213,17 @@ primOpInfo (IndexOffForeignObjOp kind) primOpInfo (WriteOffAddrOp kind) = let - s = alphaTy; s_tv = alphaTyVar + s = betaTy; s_tv = betaTyVar (str, prim_ty, _) = getPrimRepInfo kind op_str = _PK_ ("write" ++ str ++ "OffAddr#") + + tvs + | kind == StablePtrRep = [s_tv,alphaTyVar] + | otherwise = [s_tv] in -- NB: *Prim*Result -- - PrimResult op_str [s_tv] + PrimResult op_str tvs [addrPrimTy, intPrimTy, prim_ty, mkStatePrimTy s] statePrimTyCon VoidRep [s] -- 1.7.10.4