diff options
author | Nadrieril | 2019-04-07 16:45:30 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-07 16:47:55 +0200 |
commit | 4bebcd96b6e76b9b8ae7877af91d2ae571e617a9 (patch) | |
tree | 09012b2d9294a58455b74e8bd0e041f7cb153a23 /dhall/src/normalize.rs | |
parent | f680a3221c7475fae413a260d739cf8e0025081d (diff) |
Restrict public API
Closes #20
Diffstat (limited to '')
-rw-r--r-- | dhall/src/normalize.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index f9633fb..c07d3cb 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -8,6 +8,10 @@ impl Typed { pub fn normalize(self) -> Normalized { Normalized(normalize(self.0), self.1) } + /// Pretends this expression is normalized. Use with care. + pub fn skip_normalize(self) -> Normalized { + Normalized(self.0, self.1) + } } fn apply_builtin<S, A>(b: Builtin, args: &Vec<Expr<S, A>>) -> WhatNext<S, A> @@ -209,7 +213,7 @@ enum WhatNext<'a, S, A> { DoneAsIs, } -pub fn normalize_ref<S, A>(expr: &Expr<S, A>) -> Expr<S, A> +fn normalize_ref<S, A>(expr: &Expr<S, A>) -> Expr<S, A> where S: fmt::Debug + Clone, A: fmt::Debug + Clone, @@ -313,7 +317,7 @@ where /// However, `normalize` will not fail if the expression is ill-typed and will /// leave ill-typed sub-expressions unevaluated. /// -pub fn normalize<S, A>(e: SubExpr<S, A>) -> SubExpr<S, A> +fn normalize<S, A>(e: SubExpr<S, A>) -> SubExpr<S, A> where S: fmt::Debug + Clone, A: fmt::Debug + Clone, |