From 705433487da3cd3b4517fcf74b0497c76dbb4080 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 6 Aug 2019 22:36:43 +0200 Subject: Prepare for https://github.com/dhall-lang/dhall-lang/pull/630 --- dhall/src/core/value.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'dhall/src/core') diff --git a/dhall/src/core/value.rs b/dhall/src/core/value.rs index bc8fa34..f47f1b2 100644 --- a/dhall/src/core/value.rs +++ b/dhall/src/core/value.rs @@ -47,6 +47,7 @@ pub enum Value { DoubleLit(NaiveDouble), EmptyOptionalLit(TypeThunk), NEOptionalLit(Thunk), + // EmptyListLit(t) means `[] : List t` EmptyListLit(TypeThunk), NEListLit(Vec), RecordLit(HashMap), @@ -128,9 +129,10 @@ impl Value { Value::NEOptionalLit(n) => { rc(ExprF::SomeLit(n.normalize_to_expr_maybe_alpha(alpha))) } - Value::EmptyListLit(n) => { - rc(ExprF::EmptyListLit(n.normalize_to_expr_maybe_alpha(alpha))) - } + Value::EmptyListLit(n) => rc(ExprF::EmptyListLit(rc(ExprF::App( + rc(ExprF::Builtin(Builtin::List)), + n.normalize_to_expr_maybe_alpha(alpha), + )))), Value::NEListLit(elts) => rc(ExprF::NEListLit( elts.iter() .map(|n| n.normalize_to_expr_maybe_alpha(alpha)) -- cgit v1.2.3