Moduleghci-10.0.0.20260917Haskell2010
GHCi.RemoteTypes
Types for referring to remote objects in Remote GHCi. For more details, see Note [External GHCi pointers] in compilerGHCRuntime/Interpreter.hs
For details on Remote GHCi, see Note [Remote GHCi] in compilerGHCRuntime/Interpreter.hs.
Contents
Synopsis
- newtype RemotePtr
- value toRemotePtr
- value fromRemotePtr
- value castRemotePtr
- newtype RemoteRef
- value mkRemoteRef
- value localRef
- value freeRemoteRef
- value castRemoteRef
- newtype ForeignRef
- value mkForeignRef
- value withForeignRef
- value finalizeForeignRef
- value castForeignRef
- value unsafeForeignRefToRemoteRef
- newtype HValue
- type HValueRef
- type ForeignHValue
- Packageghci-10.0.0.20260917
- Exports18
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceRemoteTypes.hs
Remote pointer
RemoteRef: reference to some heap object (potentially remote)
A reference to a heap object. Potentially in a remote heap! These are allocated and freed explicitly.
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.
Convert a RemoteRef to its carried type. Should only be used if the RemoteRef originated in this process.
Release a RemoteRef that originated in this process
ForeignRef: RemoteRef with a finalizer
An RemoteRef with a finalizer
Instances1NFData
NFData (ForeignRef a)Defined in ghci-10.0.0.20260917 · GHCi.RemoteTypes
Create a ForeignRef from a RemoteRef. The finalizer should arrange to call freeRemoteRef on the RemoteRef. (since this function needs to be called in the process that created the RemoteRef, it cannot be called directly from the finalizer).
Use a ForeignRef