mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Merge branch 'trunk' into deps
This commit is contained in:
commit
69f6ffadab
39 changed files with 63 additions and 63 deletions
|
@ -20,7 +20,7 @@ pub struct Annotation {
|
|||
pub struct IntroducedVariables {
|
||||
// NOTE on rigids
|
||||
//
|
||||
// Rigids must be unique within a type annoation.
|
||||
// Rigids must be unique within a type annotation.
|
||||
// E.g. in `identity : a -> a`, there should only be one
|
||||
// variable (a rigid one, with name "a").
|
||||
// Hence `rigids : ImMap<Lowercase, Variable>`
|
||||
|
|
|
@ -973,7 +973,7 @@ fn canonicalize_pending_def<'a>(
|
|||
env.tailcallable_symbol = Some(*defined_symbol);
|
||||
};
|
||||
|
||||
// regiser the name of this closure, to make sure the closure won't capture it's own name
|
||||
// register the name of this closure, to make sure the closure won't capture it's own name
|
||||
if let (Pattern::Identifier(ref defined_symbol), &ast::Expr::Closure(_, _)) =
|
||||
(&loc_can_pattern.value, &loc_expr.value)
|
||||
{
|
||||
|
@ -1120,7 +1120,7 @@ fn canonicalize_pending_def<'a>(
|
|||
vars_by_symbol.insert(*defined_symbol, expr_var);
|
||||
};
|
||||
|
||||
// regiser the name of this closure, to make sure the closure won't capture it's own name
|
||||
// register the name of this closure, to make sure the closure won't capture it's own name
|
||||
if let (Pattern::Identifier(ref defined_symbol), &ast::Expr::Closure(_, _)) =
|
||||
(&loc_can_pattern.value, &loc_expr.value)
|
||||
{
|
||||
|
|
|
@ -552,7 +552,7 @@ pub fn canonicalize_expr<'a>(
|
|||
|
||||
// We shouldn't ultimately count arguments as referenced locals. Otherwise,
|
||||
// we end up with weird conclusions like the expression (\x -> x + 1)
|
||||
// references the (nonexistant) local variable x!
|
||||
// references the (nonexistent) local variable x!
|
||||
output.references.lookups.remove(sub_symbol);
|
||||
}
|
||||
}
|
||||
|
@ -1683,7 +1683,7 @@ fn flatten_str_lines<'a>(
|
|||
(desugar_str_segments(var_store, segments), output)
|
||||
}
|
||||
|
||||
/// Resolve stirng interpolations by desugaring a sequence of StrSegments
|
||||
/// Resolve string interpolations by desugaring a sequence of StrSegments
|
||||
/// into nested calls to Str.concat
|
||||
fn desugar_str_segments(var_store: &mut VarStore, segments: Vec<StrSegment>) -> Expr {
|
||||
use StrSegment::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue