summaryrefslogtreecommitdiff
path: root/dhall/src/main.rs
diff options
context:
space:
mode:
authorNadrieril2019-03-17 22:02:10 +0100
committerNadrieril2019-03-17 22:02:10 +0100
commit4c08c603946fa0ac483317d85a71dd1f709eec74 (patch)
treedf95a0c94da85e3a68005b114bf66b2df691c15d /dhall/src/main.rs
parent05454ab9936514409e1b3c97e36f3fb476d532ba (diff)
Use Rc consistently everywhere
Diffstat (limited to '')
-rw-r--r--dhall/src/main.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/dhall/src/main.rs b/dhall/src/main.rs
index 3328d99..41953e3 100644
--- a/dhall/src/main.rs
+++ b/dhall/src/main.rs
@@ -1,5 +1,6 @@
use std::error::Error;
use std::io::{self, Read};
+use std::rc::Rc;
use term_painter::ToStyle;
use dhall::*;
@@ -65,9 +66,9 @@ fn main() {
}
};
- let expr: Expr<_, _> = imports::panic_imports(&expr);
+ let expr: Rc<Expr<_, _>> = rc(imports::panic_imports(&expr));
- let type_expr = match typecheck::type_of(&expr) {
+ let type_expr = match typecheck::type_of(expr.clone()) {
Err(e) => {
let explain = ::std::env::args().any(|s| s == "--explain");
if !explain {
@@ -89,5 +90,5 @@ fn main() {
println!("{}", type_expr);
println!();
- println!("{}", normalize::<_, X, _>(&expr));
+ println!("{}", normalize::<_, X, _>(expr));
}