Module
Presto.Core.Types.Language.Flow
- Package
- purescript-presto
- Repository
- juspay/purescript-presto
#APIResult Source
type APIResult s = Either ErrorResponse s
#FlowMethodF Source
data FlowMethodF a s
Algebra of the Flow free language.
Constructors
RunUI (Interaction (UIResult s)) (UIResult s -> a)
ForkUI (Interaction (UIResult s)) a
CallAPI (Interaction (APIResult s)) (APIResult s -> a)
Get Store Key (Maybe String -> a)
Set Store Key String a
Fork (Flow s) (Control s -> a)
DoAff (forall eff. AppFlow eff s) (s -> a)
Await (Control s) (s -> a)
Delay Milliseconds a
OneOf (Array (Flow s)) (s -> a)
HandleError (Flow (ErrorHandler s)) (s -> a)
CheckPermissions (Array Permission) (PermissionStatus -> a)
TakePermissions (Array Permission) (Array PermissionResponse -> a)
#FlowMethod Source
type FlowMethod s a = FlowMethodF a s
#Flow Source
type Flow a = Free FlowWrapper a
Free monadic language for making flows.
#wrap Source
wrap :: forall s a. FlowMethodF a s -> Flow a
FlowWrapper for existential type.
#get Source
get :: forall s. Serializable s => Key -> Flow (Maybe s)
Gets some data from state and deserializes to s
if possible.
#set Source
set :: forall s. Serializable s => Key -> s -> Flow Unit
Serializes a value and puts it into the state.
#delay Source
delay :: Milliseconds -> Flow Unit
Delays computation for a given number of milliseconds.
#load Source
load :: forall s. Serializable s => Key -> Flow (Maybe s)
Gets some data from local storage and deserializes to s
if possible.
#save Source
save :: forall s. Serializable s => Key -> s -> Flow Unit
Serializes a value and puts it into the local storage.
#checkPermissions Source
checkPermissions :: Array Permission -> Flow PermissionStatus
Checks if permissions granted.
#takePermissions Source
takePermissions :: Array Permission -> Flow (Array PermissionResponse)
Tries to aquire permissions.
- Modules
- Presto.
Core. Flow - Presto.
Core. Language. Runtime. API - Presto.
Core. Language. Runtime. Interpreter - Presto.
Core. LocalStorage - Presto.
Core. Operators - Presto.
Core. Types. API - Presto.
Core. Types. App - Presto.
Core. Types. Language. APIInteract - Presto.
Core. Types. Language. Flow - Presto.
Core. Types. Language. Interaction - Presto.
Core. Types. Language. Storage - Presto.
Core. Types. Permission - Presto.
Core. Utils. Encoding