diff options
Diffstat (limited to 'dhall_syntax')
-rw-r--r-- | dhall_syntax/src/parser.rs | 3 | ||||
-rw-r--r-- | dhall_syntax/src/printer.rs | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index 8355ebf..0832af3 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -752,7 +752,8 @@ make_parser! { spanned(span, Merge(x, y, Some(z))) }, [List(()), expression(x)] => { - spanned(span, EmptyListLit(x)) + let list = unspanned(Builtin(crate::Builtin::List)); + spanned(span, EmptyListLit(unspanned(App(list, x)))) }, [expression(e)] => e, )); diff --git a/dhall_syntax/src/printer.rs b/dhall_syntax/src/printer.rs index 2b2bbcc..52d3d81 100644 --- a/dhall_syntax/src/printer.rs +++ b/dhall_syntax/src/printer.rs @@ -27,7 +27,7 @@ impl<SE: Display + Clone, E: Display> Display for ExprF<SE, E> { write!(f, " = {} in {}", c, d)?; } EmptyListLit(t) => { - write!(f, "[] : List {}", t)?; + write!(f, "[] : {}", t)?; } NEListLit(es) => { fmt_list("[", ", ", "]", es, f, Display::fmt)?; @@ -182,7 +182,6 @@ impl<S: Clone, A: Display + Clone> Expr<S, A> { a.phase(PrintPhase::BinOp(op)), b.phase(PrintPhase::BinOp(op)), ), - EmptyListLit(t) => EmptyListLit(t.phase(Import)), SomeLit(e) => SomeLit(e.phase(Import)), ExprF::App(f, a) => ExprF::App(f.phase(Import), a.phase(Import)), Field(a, b) => Field(a.phase(Primitive), b), |