{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module GHCi.StaticPtrTable ( sptAddEntry ) where
import Prelude
import Data.Word
import Foreign
import GHC.Fingerprint
import GHCi.RemoteTypes
sptAddEntry :: Fingerprint -> HValue -> IO ()
sptAddEntry :: Fingerprint -> HValue -> IO ()
sptAddEntry (Fingerprint ) (HValue ) = do
<- [Word64] -> IO (Ptr Word64)
forall a. Storable a => [a] -> IO (Ptr a)
newArray [Word64
a,Word64
b]
<- newStablePtr x
<- malloc
poke ent_ptr (castStablePtrToPtr sptr)
spt_insert_stableptr fpr_ptr ent_ptr
foreign import ccall "hs_spt_insert_stableptr"
spt_insert_stableptr :: Ptr Word64 -> Ptr (Ptr ()) -> IO ()