summaryrefslogtreecommitdiff
path: root/dhall/src/core
diff options
context:
space:
mode:
authorNadrieril2019-08-06 22:36:43 +0200
committerNadrieril2019-08-06 22:36:43 +0200
commit705433487da3cd3b4517fcf74b0497c76dbb4080 (patch)
tree32a55f2824cd24d90211873c5bda42a14ae4824f /dhall/src/core
parent0a1cf5554e8c06d05d24bdcdcf1eb71f0ac6d8f2 (diff)
Prepare for https://github.com/dhall-lang/dhall-lang/pull/630
Diffstat (limited to 'dhall/src/core')
-rw-r--r--dhall/src/core/value.rs8
1 files changed, 5 insertions, 3 deletions
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<Thunk>),
RecordLit(HashMap<Label, Thunk>),
@@ -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))