diff options
author | NanoTech | 2016-12-09 06:16:12 +0000 |
---|---|---|
committer | NanoTech | 2017-03-10 23:48:29 -0600 |
commit | 0838b62f7eb23200fa2dba18b894a90cbaac88b6 (patch) | |
tree | c92eab3fb3ae35a9e5b1ad0b8a1ed45d2018f93a /src/main.rs | |
parent | a43bca98afa884a26095a74b1a03da23f816c04d (diff) |
impl Display for Expr
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 17c990d..a4b5408 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,7 +89,16 @@ fn main() { expr' <- load expr */ - println!("{:?}", typecheck::type_of(&expr)); + let type_expr = match typecheck::type_of(&expr) { + Err(e) => { + println!("{:?}", e); + return; + } + Ok(type_expr) => type_expr, + }; + println!("{}", type_expr); + println!(""); + println!("{}", normalize::<_, X, _>(*expr)); /* typeExpr <- case Dhall.TypeCheck.typeOf expr' of Left err -> Control.Exception.throwIO err |