Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- localStateQueryClient :: forall block point query result m. Applicative m => [( Maybe point, query result)] -> LocalStateQueryClient block point query m [( Maybe point, Either AcquireFailure result)]
- localStateQueryServer :: forall block point query m state. Applicative m => ( Maybe point -> Either AcquireFailure state) -> ( forall result. state -> query result -> result) -> LocalStateQueryServer block point query m ()
Documentation
localStateQueryClient :: forall block point query result m. Applicative m => [( Maybe point, query result)] -> LocalStateQueryClient block point query m [( Maybe point, Either AcquireFailure result)] Source #
An example
LocalStateQueryClient
, which, for each point in the given
list, acquires the state for that point, and if that succeeds, returns the
result for the corresponding query. When the state could not be acquired,
the
AcquireFailure
is returned instead of the query results.
localStateQueryServer :: forall block point query m state. Applicative m => ( Maybe point -> Either AcquireFailure state) -> ( forall result. state -> query result -> result) -> LocalStateQueryServer block point query m () Source #
An example
LocalStateQueryServer
. The first function is called to
acquire a
state
, after which the second will be used to query the state.