From 5c15f643236c5e14c2e8797b9dc507cffc93c43a Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 20 Dec 2019 19:15:10 +0000 Subject: Fix some comments --- dhall/src/semantics/phase/mod.rs | 11 ++--------- dhall/src/syntax/text/printer.rs | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'dhall/src') diff --git a/dhall/src/semantics/phase/mod.rs b/dhall/src/semantics/phase/mod.rs index 9359c0b..7c57c3f 100644 --- a/dhall/src/semantics/phase/mod.rs +++ b/dhall/src/semantics/phase/mod.rs @@ -77,13 +77,6 @@ impl Resolved { impl Typed { /// Reduce an expression to its normal form, performing beta reduction - /// - /// `normalize` does not type-check the expression. You may want to type-check - /// expressions before normalizing them since normalization can convert an - /// ill-typed expression into a well-typed expression. - /// - /// However, `normalize` will not fail if the expression is ill-typed and will - /// leave ill-typed sub-expressions unevaluated. pub fn normalize(mut self) -> Normalized { self.normalize_mut(); Normalized(self) @@ -109,14 +102,14 @@ impl Typed { normalize: false, }) } - /// Converts a value back to the corresponding AST expression, normalizing in the process. + /// Converts a value back to the corresponding AST expression, beta-normalizing in the process. pub fn normalize_to_expr(&self) -> NormalizedExpr { self.0.to_expr(ToExprOptions { alpha: false, normalize: true, }) } - /// Converts a value back to the corresponding AST expression, (akpha,beta)-normalizing in the + /// Converts a value back to the corresponding AST expression, (alpha,beta)-normalizing in the /// process. pub(crate) fn normalize_to_expr_alpha(&self) -> NormalizedExpr { self.0.to_expr(ToExprOptions { diff --git a/dhall/src/syntax/text/printer.rs b/dhall/src/syntax/text/printer.rs index 7b781ea..78942ed 100644 --- a/dhall/src/syntax/text/printer.rs +++ b/dhall/src/syntax/text/printer.rs @@ -16,8 +16,8 @@ enum PrintPhase { Primitive, } -// Wraps an Expr with a phase, so that phase selsction can be done -// separate from the actual printing +// Wraps an Expr with a phase, so that phase selection can be done separate from the actual +// printing. #[derive(Clone)] struct PhasedExpr<'a, E>(&'a Expr, PrintPhase); -- cgit v1.2.3