mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Add TODO to remove TryTarget::Task
This commit is contained in:
parent
8bde68cc5e
commit
fd3fb16f7a
2 changed files with 2 additions and 5 deletions
|
@ -410,7 +410,6 @@ pub fn desugar_expr<'a>(
|
||||||
| Try => loc_expr,
|
| Try => loc_expr,
|
||||||
|
|
||||||
Var { module_name, ident } => {
|
Var { module_name, ident } => {
|
||||||
// TODO remove when purity inference fully replaces Task
|
|
||||||
// [purity-inference] TODO: only in Task mode
|
// [purity-inference] TODO: only in Task mode
|
||||||
if ident.ends_with('!') {
|
if ident.ends_with('!') {
|
||||||
env.arena.alloc(Loc::at(
|
env.arena.alloc(Loc::at(
|
||||||
|
|
|
@ -394,6 +394,7 @@ pub enum StrLiteral<'a> {
|
||||||
/// Values that can be tried, extracting success values or "returning early" on failure
|
/// Values that can be tried, extracting success values or "returning early" on failure
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||||
pub enum TryTarget {
|
pub enum TryTarget {
|
||||||
|
// TODO: Remove when purity inference replaces Task fully
|
||||||
/// Tasks suffixed with ! are `Task.await`ed
|
/// Tasks suffixed with ! are `Task.await`ed
|
||||||
Task,
|
Task,
|
||||||
/// Results suffixed with ? are `Result.try`ed
|
/// Results suffixed with ? are `Result.try`ed
|
||||||
|
@ -594,10 +595,7 @@ pub fn is_expr_suffixed(expr: &Expr) -> bool {
|
||||||
Expr::Var {
|
Expr::Var {
|
||||||
module_name: _,
|
module_name: _,
|
||||||
ident,
|
ident,
|
||||||
} => {
|
} => ident.ends_with('!'),
|
||||||
// TODO remove when purity inference fully replaces Task
|
|
||||||
ident.ends_with('!')
|
|
||||||
}
|
|
||||||
|
|
||||||
Expr::TrySuffix { .. } => true,
|
Expr::TrySuffix { .. } => true,
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue