Skip to content
Cinch
← Control.Task API referenceSAMPLE LISTING
cinch-async / 0.1.2Control/Task.cinch

Declaration source.

This sample listing contains the declarations shown in the API reference. Package implementations will appear here when real package data is connected.

module Control.Task where
3-- A handle to a scoped computation. Its result can be joined once.
4opaque Task scope a
5
6-- Start a child computation in the current scope.
7spawn :: forall a. (Unit ->{Io r} a) ->{Io r} Task scope a
8
9-- Wait for a task and consume its result handle.
10join :: forall a. Task scope a ->{Io r} a