diff options
author | Nadrieril | 2019-05-09 16:53:48 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-09 16:53:48 +0200 |
commit | 32051979778436ea02cb406551f126fe22ea1636 (patch) | |
tree | bf2610cfc94b39e941a505946d50669b9674789c /dhall/src/phase/normalize.rs | |
parent | 7538e29275720407ac172bb05cdbc028d95ff921 (diff) |
ExprF need not be generic in Label
Diffstat (limited to 'dhall/src/phase/normalize.rs')
-rw-r--r-- | dhall/src/phase/normalize.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dhall/src/phase/normalize.rs b/dhall/src/phase/normalize.rs index 52c1666..64de2a7 100644 --- a/dhall/src/phase/normalize.rs +++ b/dhall/src/phase/normalize.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use dhall_syntax::{ - BinOp, Builtin, ExprF, InterpolatedText, InterpolatedTextContents, Label, + BinOp, Builtin, ExprF, InterpolatedText, InterpolatedTextContents, NaiveDouble, X, }; @@ -356,12 +356,11 @@ pub(crate) fn normalize_whnf( } // Thunk subexpressions - let expr: ExprF<Thunk, Label, X> = + let expr: ExprF<Thunk, X> = expr.as_ref().map_ref_with_special_handling_of_binders( |e| Thunk::new(ctx.clone(), e.clone()), |x, e| Thunk::new(ctx.skip(x), e.clone()), |_| unreachable!(), - Label::clone, ); normalize_one_layer(expr) @@ -372,7 +371,7 @@ enum Ret<'a> { RetValue(Value), RetThunk(Thunk), RetThunkRef(&'a Thunk), - RetExpr(ExprF<Thunk, Label, X>), + RetExpr(ExprF<Thunk, X>), } fn merge_maps<K, V>( @@ -521,7 +520,7 @@ fn apply_binop<'a>(o: BinOp, x: &'a Thunk, y: &'a Thunk) -> Option<Ret<'a>> { }) } -pub(crate) fn normalize_one_layer(expr: ExprF<Thunk, Label, X>) -> Value { +pub(crate) fn normalize_one_layer(expr: ExprF<Thunk, X>) -> Value { use Ret::{RetExpr, RetThunk, RetThunkRef, RetValue}; use Value::{ BoolLit, DoubleLit, EmptyListLit, EmptyOptionalLit, IntegerLit, Lam, |