diff options
author | Nadrieril | 2019-08-20 17:08:01 +0200 |
---|---|---|
committer | Nadrieril | 2019-08-20 17:08:01 +0200 |
commit | a506632b27b287d1bf898e2f77ae09a56902474c (patch) | |
tree | 52d704b5c59c213b31b655c03b4fe14e78cb30c1 /dhall/src/core | |
parent | 04438824db21fb5d9d3a2abdb3fa167875bda892 (diff) |
Naming tweaks
Diffstat (limited to '')
-rw-r--r-- | dhall/src/core/value.rs | 6 | ||||
-rw-r--r-- | dhall/src/core/valuef.rs | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/dhall/src/core/value.rs b/dhall/src/core/value.rs index f897f16..5055ac2 100644 --- a/dhall/src/core/value.rs +++ b/dhall/src/core/value.rs @@ -8,7 +8,7 @@ use crate::core::context::TypecheckContext; use crate::core::valuef::ValueF; use crate::core::var::{AlphaVar, Shift, Subst}; use crate::error::{TypeError, TypeMessage}; -use crate::phase::normalize::{apply_any, normalize_whnf, OutputSubExpr}; +use crate::phase::normalize::{apply_any, normalize_whnf}; use crate::phase::typecheck::{builtin_to_value, const_to_value}; use crate::phase::{NormalizedSubExpr, Typed}; @@ -208,11 +208,11 @@ impl Value { pub(crate) fn normalize_to_expr_maybe_alpha( &self, alpha: bool, - ) -> OutputSubExpr { + ) -> NormalizedSubExpr { self.as_nf().normalize_to_expr_maybe_alpha(alpha) } - pub(crate) fn app_value(&self, th: Value) -> ValueF { + pub(crate) fn app(&self, th: Value) -> ValueF { apply_any(self.clone(), th) } diff --git a/dhall/src/core/valuef.rs b/dhall/src/core/valuef.rs index da03cbd..e9049c7 100644 --- a/dhall/src/core/valuef.rs +++ b/dhall/src/core/valuef.rs @@ -7,8 +7,7 @@ use dhall_syntax::{ use crate::core::value::Value; use crate::core::var::{AlphaLabel, AlphaVar, Shift, Subst}; -use crate::phase::normalize::OutputSubExpr; -use crate::phase::Normalized; +use crate::phase::{Normalized, NormalizedSubExpr}; /// A semantic value. Subexpressions are Values, which are partially evaluated expressions that are /// normalized on-demand. @@ -59,7 +58,7 @@ impl ValueF { } /// Convert the value to a fully normalized syntactic expression - pub(crate) fn normalize_to_expr(&self) -> OutputSubExpr { + pub(crate) fn normalize_to_expr(&self) -> NormalizedSubExpr { self.normalize_to_expr_maybe_alpha(false) } /// Convert the value to a fully normalized syntactic expression. Also alpha-normalize @@ -67,7 +66,7 @@ impl ValueF { pub(crate) fn normalize_to_expr_maybe_alpha( &self, alpha: bool, - ) -> OutputSubExpr { + ) -> NormalizedSubExpr { match self { ValueF::Lam(x, t, e) => rc(ExprF::Lam( x.to_label_maybe_alpha(alpha), @@ -258,8 +257,8 @@ impl ValueF { } /// Apply to a value - pub fn app_value(self, th: Value) -> ValueF { - Value::from_valuef_untyped(self).app_value(th) + pub fn app(self, th: Value) -> ValueF { + Value::from_valuef_untyped(self).app(th) } pub fn from_builtin(b: Builtin) -> ValueF { |