mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Weaken recursive let bindings
This commit is contained in:
parent
e3a213c0dc
commit
e36f90feec
1 changed files with 3 additions and 2 deletions
|
@ -3826,13 +3826,14 @@ fn is_generalizable_expr(mut expr: &Expr) -> bool {
|
||||||
Num(..) | Int(..) | Float(..) => return true,
|
Num(..) | Int(..) | Float(..) => return true,
|
||||||
Closure(_) => return true,
|
Closure(_) => return true,
|
||||||
OpaqueRef { argument, .. } => expr = &argument.1.value,
|
OpaqueRef { argument, .. } => expr = &argument.1.value,
|
||||||
Str(_) | List { .. } | SingleQuote(_, _, _, _) | When { .. } | If { .. } => {
|
Str(_) | List { .. } | SingleQuote(_, _, _, _) | When { .. } | If { .. }
|
||||||
|
| LetRec(_, _, _)
|
||||||
|
=> {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// TODO(weakening)
|
// TODO(weakening)
|
||||||
Var(_, _)
|
Var(_, _)
|
||||||
| AbilityMember(_, _, _)
|
| AbilityMember(_, _, _)
|
||||||
| LetRec(_, _, _)
|
|
||||||
| LetNonRec(_, _)
|
| LetNonRec(_, _)
|
||||||
| Call(_, _, _)
|
| Call(_, _, _)
|
||||||
| RunLowLevel { .. }
|
| RunLowLevel { .. }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue