ghci-8.7: The library supporting GHC's interactive interpreter
Safe HaskellNone
LanguageHaskell2010

GHCi.RemoteTypes

Description

Types for referring to remote objects in Remote GHCi. For more details, see Note [External GHCi pointers] in compilerghciGHCi.hs

For details on Remote GHCi, see Note [Remote GHCi] in compilerghciGHCi.hs.

Synopsis

Documentation

mkForeignRef :: RemoteRef a -> IO () -> IO (ForeignRef a) Source #

Create a ForeignRef from a RemoteRef. The finalizer should arrange to call freeHValueRef on the HValueRef. (since this function needs to be called in the process that created the HValueRef, it cannot be called directly from the finalizer).

data ForeignRef a Source #

An HValueRef with a finalizer

Instances

Instances details
NFData (ForeignRef a) Source # 
Instance details

Defined in GHCi.RemoteTypes

Methods

rnf :: ForeignRef a -> () Source #

freeRemoteRef :: RemoteRef a -> IO () Source #

Release an HValueRef that originated in this process

localRef :: RemoteRef a -> IO a Source #

Convert an HValueRef to an HValue. Should only be used if the HValue originated in this process.

mkRemoteRef :: a -> IO (RemoteRef a) Source #

Make a reference to a local value that we can send remotely. This reference will keep the value that it refers to alive until freeRemoteRef is called.

data RemoteRef a Source #

A reference to a remote value. These are allocated and freed explicitly.

Instances

Instances details
Show (RemoteRef a) Source # 
Instance details

Defined in GHCi.RemoteTypes

Binary (RemoteRef a) Source # 
Instance details

Defined in GHCi.RemoteTypes

newtype HValue Source #

Constructors

HValue Any 

Instances

Instances details
Show HValue Source # 
Instance details

Defined in GHCi.RemoteTypes

newtype RemotePtr a Source #

Constructors

RemotePtr Word64 

Instances

Instances details
Show (RemotePtr a) Source # 
Instance details

Defined in GHCi.RemoteTypes

Binary (RemotePtr a) Source # 
Instance details

Defined in GHCi.RemoteTypes

NFData (RemotePtr a) Source # 
Instance details

Defined in GHCi.RemoteTypes

Methods

rnf :: RemotePtr a -> () Source #