| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Language.Futhark.Interpreter.FFI.Push
Synopsis
- put :: forall (m :: Type -> Type). TypeName -> Value m -> ServerM ValueRef
- putArgs :: forall (m :: Type -> Type). Name -> [Value m] -> ServerM [ValueRef]
- get :: forall (m :: Type -> Type). ValueShape -> ValueRef -> ServerM (Value m)
- hasLazy :: forall (m :: Type -> Type). Value m -> Bool
- getLazy :: forall (a :: Type -> Type). Value a -> ServerM (Value a)
- lazyGet :: forall (m :: Type -> Type). ValueShape -> ValueRef -> ServerM (Value m)
- data ResShape
- resultShape :: ResShape -> ValueRef -> ServerM ValueShape
Documentation
putArgs :: forall (m :: Type -> Type). Name -> [Value m] -> ServerM [ValueRef] Source #
Put these values on the server as the arguments of the given entry point.
hasLazy :: forall (m :: Type -> Type). Value m -> Bool Source #
Does this value contain any references to values residing on a server?
getLazy :: forall (a :: Type -> Type). Value a -> ServerM (Value a) Source #
Get all the values residing on the server. The resulting Value has no
ValueLazyFFI in it.
lazyGet :: forall (m :: Type -> Type). ValueShape -> ValueRef -> ServerM (Value m) Source #
As get, but arrays, including those in records, are left on the server.
How much of the shape of a value its type determines. Array dimensions may be unknown at the type level, so they must be extracted from the actual server-side value.
Constructors
| ResArray ResShape | An array of any rank; the argument describes its elements (after stripping array dimensions). |
| ResRecord (Map Name ResShape) | A record, whose fields are described individually. |
| ResSum (Map Name [ResShape]) | A sum type, whose constructor payloads are described individually. Only the payload of the constructor that is actually present can be inspected, so the resulting shape describes only that constructor. |
| ResKnown ValueShape | Determined by the type alone. |
resultShape :: ResShape -> ValueRef -> ServerM ValueShape Source #
Determine the shape of a value residing on the server, consulting the server for whatever the type did not settle.