From 4c08c603946fa0ac483317d85a71dd1f709eec74 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 17 Mar 2019 22:02:10 +0100 Subject: Use Rc consistently everywhere --- dhall/src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dhall/src/main.rs') 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> = 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)); } -- cgit v1.2.3