summaryrefslogtreecommitdiff
path: root/docs/type_system/task.md
blob: 099ac19a4e8a6bd504c7bb288785b525b8b0c443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Task

---

An asynchronous encapsulation

```text
Task[TYPE; Error]
```

## \`await

```
v : `await task // value is in v or error is thrown
```

# Matching

```text
# `await task {
    .value { v ... }[v]
    .error { e ... }[e]
}
```

## .value

## .error