summaryrefslogtreecommitdiff
path: root/dhall/src/phase
diff options
context:
space:
mode:
authorNadrieril2019-08-25 16:33:12 +0200
committerNadrieril2019-08-25 16:37:31 +0200
commit80fb5355ea90377492b9863f632c01a808f8aade (patch)
treee9de4459615e601da64862e26c56c68b4265999e /dhall/src/phase
parent98399997cf289d802fbed674558665547cf73d59 (diff)
Check consistency of type information
Diffstat (limited to 'dhall/src/phase')
-rw-r--r--dhall/src/phase/normalize.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/dhall/src/phase/normalize.rs b/dhall/src/phase/normalize.rs
index 5743b0d..fe99696 100644
--- a/dhall/src/phase/normalize.rs
+++ b/dhall/src/phase/normalize.rs
@@ -61,8 +61,8 @@ macro_rules! make_closure {
(Some($($rest:tt)*)) => {{
let v = make_closure!($($rest)*);
let v_type = v.get_type().expect("Internal type error");
- ValueF::NEOptionalLit(v)
- .into_value_with_type(v_type)
+ let opt_v_type = Value::from_builtin(Builtin::Optional).app(v_type);
+ ValueF::NEOptionalLit(v).into_value_with_type(opt_v_type)
}};
(1 + $($rest:tt)*) => {
ValueF::PartialExpr(ExprF::BinOp(