summaryrefslogtreecommitdiff
path: root/dhall_core/src/printer.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall_core/src/printer.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/dhall_core/src/printer.rs b/dhall_core/src/printer.rs
index b153d1b..b7d7506 100644
--- a/dhall_core/src/printer.rs
+++ b/dhall_core/src/printer.rs
@@ -35,7 +35,7 @@ impl<S, A: Display> Expr<S, A> {
f: &mut fmt::Formatter,
phase: PrintPhase,
) -> Result<(), fmt::Error> {
- use crate::Expr::*;
+ use crate::ExprF::*;
use PrintPhase::*;
match self {
_ if phase == Paren => {
@@ -143,7 +143,7 @@ impl<S, A: Display> Expr<S, A> {
write!(f, " : ")?;
b.fmt(f)?;
}
- Expr::BinOp(op, a, b) => {
+ ExprF::BinOp(op, a, b) => {
// Precedence is magically handled by the ordering of BinOps.
if phase > PrintPhase::BinOp(*op) {
return self.fmt_phase(f, Paren);
@@ -152,7 +152,7 @@ impl<S, A: Display> Expr<S, A> {
write!(f, " {} ", op)?;
b.fmt_phase(f, PrintPhase::BinOp(*op))?;
}
- Expr::App(a, args) => {
+ ExprF::App(a, args) => {
if phase > PrintPhase::App {
return self.fmt_phase(f, Paren);
}
@@ -239,7 +239,7 @@ where
f.write_str(close)
}
-impl<S, A: Display> Display for InterpolatedText<S, A> {
+impl<SubExpr: Display + Clone> Display for InterpolatedText<SubExpr> {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
f.write_str("\"")?;
for x in self.iter() {