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 sAlgebra of the Flow free language.
Constructors
RunUI (Interaction (UIResult s)) (UIResult s -> a)ForkUI (Interaction (UIResult s)) aCallAPI (Interaction (APIResult s)) (APIResult s -> a)Get Store Key (Maybe String -> a)Set Store Key String aFork (Flow s) (Control s -> a)DoAff (forall eff. AppFlow eff s) (s -> a)Await (Control s) (s -> a)Delay Milliseconds aOneOf (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 aFree monadic language for making flows.
#wrap Source
wrap :: forall s a. FlowMethodF a s -> Flow aFlowWrapper 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 UnitSerializes a value and puts it into the state.
#delay Source
delay :: Milliseconds -> Flow UnitDelays 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 UnitSerializes a value and puts it into the local storage.
#checkPermissions Source
checkPermissions :: Array Permission -> Flow PermissionStatusChecks 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