fix some typos

This commit is contained in:
rvcas
2023-04-07 16:51:18 -04:00
parent d0d482b3cb
commit 1444c9328d
16 changed files with 26 additions and 26 deletions

View File

@@ -603,8 +603,8 @@ impl<'comments> Formatter<'comments> {
let count = expressions.len();
let mut documents = Vec::with_capacity(count * 2);
for (i, expression) in expressions.iter().enumerate() {
let preceeding_newline = self.pop_empty_lines(expression.start_byte_index());
if i != 0 && preceeding_newline {
let preceding_newline = self.pop_empty_lines(expression.start_byte_index());
if i != 0 && preceding_newline {
documents.push(lines(2));
} else if i != 0 {
documents.push(lines(1));

View File

@@ -61,9 +61,9 @@ mod test {
fn common_ancestor_equal_vecs() {
let ancestor = Scope(vec![1, 2, 3, 4, 5, 6]);
let decendant = Scope(vec![1, 2, 3, 4, 5, 6]);
let descendant = Scope(vec![1, 2, 3, 4, 5, 6]);
let result = ancestor.common_ancestor(&decendant);
let result = ancestor.common_ancestor(&descendant);
assert_eq!(result, Scope(vec![1, 2, 3, 4, 5, 6]))
}
@@ -72,9 +72,9 @@ mod test {
fn common_ancestor_equal_ancestor() {
let ancestor = Scope(vec![1, 2, 3, 4]);
let decendant = Scope(vec![1, 2, 3, 4, 5, 6]);
let descendant = Scope(vec![1, 2, 3, 4, 5, 6]);
let result = ancestor.common_ancestor(&decendant);
let result = ancestor.common_ancestor(&descendant);
assert_eq!(result, Scope(vec![1, 2, 3, 4]));
}

View File

@@ -169,7 +169,7 @@ pub enum Pattern {
#[error("I found an unexpected type name.")]
#[diagnostic(help("Try removing it!"))]
TypeIdent,
#[error("I found an unexpected indentifier.")]
#[error("I found an unexpected identifier.")]
#[diagnostic(help("Try removing it!"))]
TermIdent,
#[error("I found an unexpected end of input.")]

View File

@@ -427,12 +427,12 @@ impl<'a> Environment<'a> {
match self
.entity_usages
.last_mut()
.expect("Attempted to access non-existant entity usages scope")
.expect("Attempted to access non-existent entity usages scope")
.insert(name.to_string(), (kind, location, false))
{
// Private types can be shadowed by a constructor with the same name
//
// TODO: Improve this so that we can tell if an imported overriden
// TODO: Improve this so that we can tell if an imported overridden
// type is actually used or not by tracking whether usages apply to
// the value or type scope
Some((ImportedType | ImportedTypeAndConstructor | PrivateType, _, _)) => (),

View File

@@ -1560,7 +1560,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
Some(tail) => {
let tail = self.infer(*tail)?;
// Ensure the tail has the same type as the preceeding elements
// Ensure the tail has the same type as the preceding elements
self.unify(tipo.clone(), tail.tipo(), location, false)?;
Some(Box::new(tail))

View File

@@ -20,7 +20,7 @@ use super::{
/// It keeps track of any type variables created. This is useful for:
///
/// - Determining if a generic type variable should be made into an
/// unbound type varable during type instantiation.
/// unbound type variable during type instantiation.
/// - Ensuring that the same type is constructed if the programmer
/// uses the same name for a type variable multiple times.
///
@@ -146,7 +146,7 @@ impl Hydrator {
.get_type_constructor(module, name, *location)?
.clone();
// Register the type constructor as being used if it is unqualifed.
// Register the type constructor as being used if it is unqualified.
// We do not track use of qualified type constructors as they may be
// used in another module.
if module.is_none() {