Skip to content

Commit 5b74b8e

Browse files
authored
Merge pull request #473 from Kmeakin/spelling
Replace all spellings of `-ise` with `-ize`
2 parents 68efcdc + a65e72b commit 5b74b8e

File tree

15 files changed

+41
-41
lines changed

15 files changed

+41
-41
lines changed

fathom/src/core/semantics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//! The semantics of the core language, implemented using [normalisation by
2-
//! evaluation](https://en.wikipedia.org/wiki/Normalisation_by_evaluation).
1+
//! The semantics of the core language, implemented using [normalization by
2+
//! evaluation](https://en.wikipedia.org/wiki/Normalization_by_evaluation).
33
44
use std::panic::panic_any;
55
use std::sync::Arc;
@@ -268,10 +268,10 @@ impl<'arena, 'env> EvalEnv<'arena, 'env> {
268268
value.unwrap_or_else(|| panic_any(Error::UnboundLocalVar))
269269
}
270270

271-
/// Fully normalise a term by first [evaluating][EvalEnv::eval] it into
271+
/// Fully normalize a term by first [evaluating][EvalEnv::eval] it into
272272
/// a [value][Value], then [quoting it back][QuoteEnv::quote] into a
273273
/// [term][Term].
274-
pub fn normalise<'out_arena>(
274+
pub fn normalize<'out_arena>(
275275
&mut self,
276276
scope: &'out_arena Scope<'out_arena>,
277277
term: &Term<'arena>,

fathom/src/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl<'surface, 'core> Driver<'surface, 'core> {
254254
Status::Ok
255255
}
256256

257-
pub fn normalise_and_emit_term(&mut self, file_id: FileId) -> Status {
257+
pub fn normalize_and_emit_term(&mut self, file_id: FileId) -> Status {
258258
let mut context =
259259
elaboration::Context::new(file_id, &self.interner, &self.core_scope, ItemEnv::new());
260260

@@ -269,8 +269,8 @@ impl<'surface, 'core> Driver<'surface, 'core> {
269269
return Status::Error;
270270
}
271271

272-
let term = context.eval_env().normalise(&self.core_scope, &term);
273-
let r#type = context.eval_env().normalise(&self.core_scope, &r#type);
272+
let term = context.eval_env().normalize(&self.core_scope, &term);
273+
let r#type = context.eval_env().normalize(&self.core_scope, &r#type);
274274

275275
self.surface_scope.reset(); // Reuse the surface scope for distillation
276276
let mut context = context.distillation_context(&self.surface_scope);

fathom/src/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub fn indices() -> impl Iterator<Item = Index> {
8787
/// Levels are used in [values][crate::core::semantics::Value] because they
8888
/// are not tied to a specific binding depth, unlike [indices][Index].
8989
/// Because of this, we're able to sidestep the need for expensive variable
90-
/// shifting during [normalisation][crate::core::semantics::EvalEnv::normalise].
90+
/// shifting during [normalization][crate::core::semantics::EvalEnv::normalize].
9191
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
9292
pub struct Level(RawVar);
9393

fathom/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ enum Cli {
3333
#[clap(long = "pretty-core", conflicts_with("TERM_FILE"))]
3434
pretty_core: bool,
3535
},
36-
/// Normalise a Fathom term, printing its normal form and type
36+
/// Normalize a Fathom term, printing its normal form and type
3737
Norm {
38-
/// Path to a term to normalise
38+
/// Path to a term to normalize
3939
#[clap(long = "term", name = "TERM_FILE", display_order = 0)]
4040
term_file: PathOrStdin,
4141
/// Continue even if errors were encountered
@@ -184,7 +184,7 @@ fn main() -> ! {
184184
driver.set_emit_width(get_pretty_width());
185185

186186
let file_id = load_file_or_exit(&mut driver, term_file);
187-
let status = driver.normalise_and_emit_term(file_id);
187+
let status = driver.normalize_and_emit_term(file_id);
188188

189189
std::process::exit(status.exit_code());
190190
}

fathom/src/surface/distillation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ fn match_if_then_else<'arena>(
896896
) -> Option<(&'arena core::Term<'arena>, &'arena core::Term<'arena>)> {
897897
match (branches, default_branch) {
898898
([(Const::Bool(false), else_expr), (Const::Bool(true), then_expr)], None)
899-
// TODO: Normalise boolean branches when elaborating patterns
899+
// TODO: Normalize boolean branches when elaborating patterns
900900
| ([(Const::Bool(true), then_expr)], Some((_, else_expr)))
901901
| ([(Const::Bool(false), else_expr)], Some((_, then_expr))) => Some((then_expr, else_expr)),
902902
_ => None,

fathom/src/surface/elaboration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ impl<'interner, 'arena> Context<'interner, 'arena> {
18061806
self.scope.to_scope(body_expr),
18071807
)
18081808
}
1809-
// If an implicit function is expected, try to generalise the
1809+
// If an implicit function is expected, try to generalize the
18101810
// function literal by wrapping it in an implicit function
18111811
Value::FunType(Plicity::Implicit, param_name, param_type, next_body_type)
18121812
if param.plicity == Plicity::Explicit =>

fathom/src/surface/elaboration/unification.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ impl<'arena, 'env> Context<'arena, 'env> {
490490
Ok(())
491491
}
492492

493-
/// Re-initialise the [`Context::renaming`] by mapping the local variables
493+
/// Re-initialize the [`Context::renaming`] by mapping the local variables
494494
/// in the spine to the local variables in the solution. This can fail if
495495
/// the spine does not contain distinct local variables.
496496
fn init_renaming(&mut self, spine: &[Elim<'arena>]) -> Result<(), SpineError> {
@@ -738,7 +738,7 @@ impl PartialRenaming {
738738
}
739739
}
740740

741-
/// Re-initialise the renaming to the requested `source_len`, reusing the
741+
/// Re-initialize the renaming to the requested `source_len`, reusing the
742742
/// previous allocation.
743743
fn init(&mut self, source_len: EnvLen) {
744744
self.source.clear();

fathom/tests/source_tests.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ struct Config {
5252
example_data_invalid: Vec<String>,
5353
#[serde(skip)]
5454
update_snapshots: bool,
55-
#[serde(default = "DEFAULT_TEST_NORMALISATION")]
56-
test_normalisation: bool,
55+
#[serde(default = "DEFAULT_TEST_NORMALIZATION")]
56+
test_normalization: bool,
5757
}
5858

5959
const DEFAULT_ALLOW_ERRORS: fn() -> bool = || false;
6060
const DEFAULT_IGNORE: fn() -> bool = || false;
6161
const DEFAULT_EXIT_CODE: fn() -> i32 = || 0;
6262
const DEFAULT_EXAMPLE_DATA: fn() -> Vec<String> = Vec::new;
63-
const DEFAULT_TEST_NORMALISATION: fn() -> bool = || false;
63+
const DEFAULT_TEST_NORMALIZATION: fn() -> bool = || false;
6464

6565
struct TestFailure {
6666
name: &'static str,
@@ -99,7 +99,7 @@ struct TestCommand<'a> {
9999
enum Command<'a> {
100100
ElabModule,
101101
ElabTerm,
102-
Normalise,
102+
Normalize,
103103
ParseData(&'a Path, ExpectedOutcome),
104104
}
105105

@@ -112,15 +112,15 @@ enum ExpectedOutcome {
112112
impl<'a> Command<'a> {
113113
fn snap_name(&self) -> &'static str {
114114
match self {
115-
Command::Normalise => "norm",
115+
Command::Normalize => "norm",
116116
Command::ElabModule | Command::ElabTerm | Command::ParseData(_, _) => "",
117117
}
118118
}
119119

120120
pub(crate) fn expected_outcome(&self) -> ExpectedOutcome {
121121
match self {
122122
Command::ParseData(_, outcome) => *outcome,
123-
Command::ElabModule | Command::ElabTerm | Command::Normalise => {
123+
Command::ElabModule | Command::ElabTerm | Command::Normalize => {
124124
ExpectedOutcome::Success
125125
}
126126
}
@@ -205,8 +205,8 @@ fn run_test(
205205
}
206206
}
207207

208-
if config.test_normalisation {
209-
let test_command = TestCommand::new(Command::Normalise, &config, &input_file);
208+
if config.test_normalization {
209+
let test_command = TestCommand::new(Command::Normalize, &config, &input_file);
210210
match test_command.run() {
211211
Ok(mut test_failures) => failures.append(&mut test_failures),
212212
Err(error) => {
@@ -410,7 +410,7 @@ impl<'a> From<Command<'a>> for process::Command {
410410
Command::ElabTerm => {
411411
exe.args(["elab", "--term"]);
412412
}
413-
Command::Normalise => {
413+
Command::Normalize => {
414414
exe.args(["norm", "--term"]);
415415
}
416416
Command::ParseData(format, _) => {
@@ -487,9 +487,9 @@ impl Snapshot {
487487
}
488488

489489
fn update(&mut self) -> Result<(), io::Error> {
490-
let serialised = toml::to_string_pretty(&self.actual)
490+
let serialized = toml::to_string_pretty(&self.actual)
491491
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
492-
fs::write(&self.path, serialised)?;
492+
fs::write(&self.path, serialized)?;
493493
self.expected = Some(self.actual.clone());
494494
Ok(())
495495
}

tests/cmd/fathom-norm.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Short help can be printed with `-h`
66

77
```console
88
$ fathom norm -h
9-
Normalise a Fathom term, printing its normal form and type
9+
Normalize a Fathom term, printing its normal form and type
1010

1111
Usage: fathom norm [OPTIONS] --term <TERM_FILE>
1212

1313
Options:
14-
--term <TERM_FILE> Path to a term to normalise
14+
--term <TERM_FILE> Path to a term to normalize
1515
--allow-errors Continue even if errors were encountered
1616
-h, --help Print help information
1717

@@ -21,12 +21,12 @@ Long help can be printed with `--help`
2121

2222
```console
2323
$ fathom norm --help
24-
Normalise a Fathom term, printing its normal form and type
24+
Normalize a Fathom term, printing its normal form and type
2525

2626
Usage: fathom norm [OPTIONS] --term <TERM_FILE>
2727

2828
Options:
29-
--term <TERM_FILE> Path to a term to normalise
29+
--term <TERM_FILE> Path to a term to normalize
3030
--allow-errors Continue even if errors were encountered
3131
-h, --help Print help information
3232

@@ -76,7 +76,7 @@ error: couldn't read `does/not/exist.fathom`: No such file or directory (os erro
7676

7777
### Type errors
7878

79-
The term must be well-typed before normalisation
79+
The term must be well-typed before normalization
8080

8181
```console
8282
$ fathom norm --term tests/fail/elaboration/duplicate-field-labels/record-literal.fathom

tests/cmd/fathom.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Usage: fathom <COMMAND>
1212

1313
Commands:
1414
elab Elaborate a Fathom module or term, printing the result to stdout
15-
norm Normalise a Fathom term, printing its normal form and type
15+
norm Normalize a Fathom term, printing its normal form and type
1616
data Manipulate binary data based on a Fathom format
1717
help Print this message or the help of the given subcommand(s)
1818

@@ -32,7 +32,7 @@ Usage: fathom <COMMAND>
3232

3333
Commands:
3434
elab Elaborate a Fathom module or term, printing the result to stdout
35-
norm Normalise a Fathom term, printing its normal form and type
35+
norm Normalize a Fathom term, printing its normal form and type
3636
data Manipulate binary data based on a Fathom format
3737
help Print this message or the help of the given subcommand(s)
3838

@@ -55,7 +55,7 @@ Usage: fathom <COMMAND>
5555

5656
Commands:
5757
elab Elaborate a Fathom module or term, printing the result to stdout
58-
norm Normalise a Fathom term, printing its normal form and type
58+
norm Normalize a Fathom term, printing its normal form and type
5959
data Manipulate binary data based on a Fathom format
6060
help Print this message or the help of the given subcommand(s)
6161

0 commit comments

Comments
 (0)