diff options
author | Nadrieril | 2020-01-30 22:01:54 +0000 |
---|---|---|
committer | Nadrieril | 2020-01-30 22:01:54 +0000 |
commit | 4e2bb03bcf6355d49216c6886bf03e5aeaad16cc (patch) | |
tree | 7660e664bbf58f3bbe06f4cc13d10f4633064669 /dhall/src | |
parent | ace2a1f2783f770dc801f74e9118d39c73eb158a (diff) |
Eval Thunk by move
Diffstat (limited to 'dhall/src')
-rw-r--r-- | dhall/src/semantics/nze/value.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dhall/src/semantics/nze/value.rs b/dhall/src/semantics/nze/value.rs index 945ee6e..724e3e8 100644 --- a/dhall/src/semantics/nze/value.rs +++ b/dhall/src/semantics/nze/value.rs @@ -502,12 +502,11 @@ impl Thunk { ) -> Self { Thunk::PartialExpr { env, expr, ty } } - // TODO: take by value - pub fn eval(&self) -> ValueKind { + pub fn eval(self) -> ValueKind { match self { - Thunk::Thunk { env, body } => normalize_tyexpr_whnf(body, env), + Thunk::Thunk { env, body } => normalize_tyexpr_whnf(&body, &env), Thunk::PartialExpr { env, expr, ty } => { - normalize_one_layer(expr.clone(), ty, env) + normalize_one_layer(expr, &ty, &env) } } } |