mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Remove Task from Roc
This commit is contained in:
parent
fbf448cac8
commit
2150ee2219
139 changed files with 337 additions and 14295 deletions
|
@ -80,21 +80,17 @@ pub enum CalledVia {
|
|||
|
||||
/// This call is the result of desugaring a map2-based Record Builder field. e.g.
|
||||
/// ```roc
|
||||
/// { Task.parallel <-
|
||||
/// foo: get "a",
|
||||
/// bar: get "b",
|
||||
/// { Result.parallel <-
|
||||
/// foo: get("a"),
|
||||
/// bar: get("b"),
|
||||
/// }
|
||||
/// ```
|
||||
/// is transformed into
|
||||
/// ```roc
|
||||
/// Task.parallel (get "a") (get "b") \foo, bar -> { foo, bar }
|
||||
/// Result.parallel(get("a"), get("b"), (\foo, bar -> { foo, bar }))
|
||||
/// ```
|
||||
RecordBuilder,
|
||||
|
||||
/// This call is the result of desugaring a Task.await from `!` syntax
|
||||
/// e.g. Stdout.line! "Hello" becomes Task.await (Stdout.line "Hello") \{} -> ...
|
||||
BangSuffix,
|
||||
|
||||
/// This call is the result of desugaring a Result.try from `?` syntax
|
||||
/// e.g. Dict.get? items "key" becomes Result.try (Dict.get items "key") \item -> ...
|
||||
QuestionSuffix,
|
||||
|
|
|
@ -130,7 +130,6 @@ impl ModuleName {
|
|||
pub const DECODE: &'static str = "Decode";
|
||||
pub const HASH: &'static str = "Hash";
|
||||
pub const INSPECT: &'static str = "Inspect";
|
||||
pub const TASK: &'static str = "Task";
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
self.0.as_str()
|
||||
|
|
|
@ -1717,24 +1717,6 @@ define_builtins! {
|
|||
32 INSPECT_TO_INSPECTOR: "to_inspector"
|
||||
33 INSPECT_TO_STR: "to_str"
|
||||
}
|
||||
15 TASK: "Task" => {
|
||||
0 TASK_TASK: "Task" exposed_type=true // the Task.Task opaque type
|
||||
1 TASK_FOREVER: "forever"
|
||||
2 TASK_LOOP: "loop"
|
||||
3 TASK_OK: "ok"
|
||||
4 TASK_ERR: "err"
|
||||
5 TASK_ATTEMPT: "attempt"
|
||||
6 TASK_AWAIT: "await"
|
||||
7 TASK_ON_ERR: "on_err"
|
||||
8 TASK_MAP: "map"
|
||||
9 TASK_MAP_ERR: "map_err"
|
||||
10 TASK_FROM_RESULT: "from_result"
|
||||
11 TASK_BATCH: "batch"
|
||||
12 TASK_COMBINE: "combine"
|
||||
13 TASK_SEQUENCE: "sequence"
|
||||
14 TASK_FOR_EACH: "for_each"
|
||||
15 TASK_RESULT: "result"
|
||||
}
|
||||
|
||||
num_modules: 16 // Keep this count up to date by hand! (TODO: see the mut_map! macro for how we could determine this count correctly in the macro)
|
||||
num_modules: 15 // Keep this count up to date by hand! (TODO: see the mut_map! macro for how we could determine this count correctly in the macro)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue