diff options
author | Nadrieril | 2019-04-20 23:12:25 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-20 23:12:25 +0200 |
commit | 83bc67d4572fe7961842f915d5559ee489e13dfd (patch) | |
tree | d6bff16ce18dda443aa8b9a2fb31c31f0a502ec4 /dhall_core/src/printer.rs | |
parent | 5812a53cc9241703bd35586da0036dc170ab3721 (diff) |
An empty optional value is purely semantic
Diffstat (limited to 'dhall_core/src/printer.rs')
-rw-r--r-- | dhall_core/src/printer.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/dhall_core/src/printer.rs b/dhall_core/src/printer.rs index ea291a9..c4bad71 100644 --- a/dhall_core/src/printer.rs +++ b/dhall_core/src/printer.rs @@ -38,10 +38,7 @@ impl<SE: Display + Clone, N, E: Display> Display for ExprF<SE, Label, N, E> { OldOptionalLit(Some(x), t) => { write!(f, "[{}] : Optional {}", x, t)?; } - EmptyOptionalLit(t) => { - write!(f, "None {}", t)?; - } - NEOptionalLit(e) => { + SomeLit(e) => { write!(f, "Some {}", e)?; } Merge(a, b, c) => { @@ -159,8 +156,7 @@ impl<S: Clone, A: Display + Clone> Expr<S, A> { | EmptyListLit(_) | NEListLit(_) | OldOptionalLit(_, _) - | EmptyOptionalLit(_) - | NEOptionalLit(_) + | SomeLit(_) | Merge(_, _, _) | Annot(_, _) if phase > Base => @@ -200,8 +196,7 @@ impl<S: Clone, A: Display + Clone> Expr<S, A> { ), EmptyListLit(t) => EmptyListLit(t.phase(Import)), OldOptionalLit(x, t) => OldOptionalLit(x, t.phase(Import)), - EmptyOptionalLit(t) => EmptyOptionalLit(t.phase(Import)), - NEOptionalLit(e) => NEOptionalLit(e.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), Projection(e, ls) => Projection(e.phase(Primitive), ls), |