mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Remove unused TypedHole variant from roc_can::expr::Expr
This commit is contained in:
parent
46067cf28c
commit
dcb6c543c0
10 changed files with 1 additions and 25 deletions
|
@ -718,8 +718,6 @@ fn deep_copy_expr_help<C: CopyEnv>(env: &mut C, copied: &mut Vec<Variable>, expr
|
|||
symbol: *symbol,
|
||||
},
|
||||
|
||||
TypedHole(v) => TypedHole(sub!(*v)),
|
||||
|
||||
RuntimeError(err) => RuntimeError(err.clone()),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -453,7 +453,6 @@ fn expr<'a>(c: &Ctx, p: EPrec, f: &'a Arena<'a>, e: &'a Expr) -> DocBuilder<'a,
|
|||
Dbg { .. } => todo!(),
|
||||
Expect { .. } => todo!(),
|
||||
Return { .. } => todo!(),
|
||||
TypedHole(_) => todo!(),
|
||||
RuntimeError(_) => todo!(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -333,9 +333,6 @@ pub enum Expr {
|
|||
return_var: Variable,
|
||||
},
|
||||
|
||||
/// Rendered as empty box in editor
|
||||
TypedHole(Variable),
|
||||
|
||||
/// Compiles, but will crash if reached
|
||||
RuntimeError(RuntimeError),
|
||||
}
|
||||
|
@ -411,7 +408,7 @@ impl Expr {
|
|||
Self::Dbg { .. } => Category::Expect,
|
||||
|
||||
// these nodes place no constraints on the expression's type
|
||||
Self::TypedHole(_) | Self::RuntimeError(..) => Category::Unknown,
|
||||
Self::RuntimeError(..) => Category::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2095,7 +2092,6 @@ pub fn inline_calls(var_store: &mut VarStore, expr: Expr) -> Expr {
|
|||
| other @ ParamsVar { .. }
|
||||
| other @ AbilityMember(..)
|
||||
| other @ RunLowLevel { .. }
|
||||
| other @ TypedHole { .. }
|
||||
| other @ ForeignCall { .. }
|
||||
| other @ OpaqueWrapFunction(_)
|
||||
| other @ Crash { .. }
|
||||
|
@ -3460,7 +3456,6 @@ pub(crate) fn get_lookup_symbols(expr: &Expr) -> Vec<ExpectLookup> {
|
|||
| Expr::RecordAccessor(_)
|
||||
| Expr::SingleQuote(..)
|
||||
| Expr::EmptyRecord
|
||||
| Expr::TypedHole(_)
|
||||
| Expr::RuntimeError(_)
|
||||
| Expr::ImportParams(_, _, None)
|
||||
| Expr::OpaqueWrapFunction(_) => {}
|
||||
|
|
|
@ -1055,7 +1055,6 @@ fn fix_values_captured_in_closure_expr(
|
|||
| ParamsVar { .. }
|
||||
| AbilityMember(..)
|
||||
| EmptyRecord
|
||||
| TypedHole { .. }
|
||||
| RuntimeError(_)
|
||||
| ZeroArgumentTag { .. }
|
||||
| RecordAccessor { .. } => {}
|
||||
|
|
|
@ -406,7 +406,6 @@ pub fn walk_expr<V: Visitor>(visitor: &mut V, expr: &Expr, var: Variable) {
|
|||
} => {
|
||||
visitor.visit_expr(&return_value.value, return_value.region, *return_var);
|
||||
}
|
||||
Expr::TypedHole(_) => { /* terminal */ }
|
||||
Expr::RuntimeError(..) => { /* terminal */ }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue