Merge branch 'trunk' into deps

This commit is contained in:
Anton-4 2021-11-06 18:07:34 +01:00 committed by GitHub
commit 69f6ffadab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 63 additions and 63 deletions

View file

@ -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>`

View file

@ -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)
{

View file

@ -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::*;