summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src')
-rw-r--r--dhall/src/semantics/phase/mod.rs11
-rw-r--r--dhall/src/syntax/text/printer.rs4
2 files changed, 4 insertions, 11 deletions
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<E>, PrintPhase);