From 99f379f6bc319f1055a72521493caa554d515e65 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 13 Apr 2019 18:21:21 +0200 Subject: Various typecheck improvements --- dhall/src/typecheck.rs | 176 ++++++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 83 deletions(-) (limited to 'dhall') diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs index 891c906..d241d8d 100644 --- a/dhall/src/typecheck.rs +++ b/dhall/src/typecheck.rs @@ -110,7 +110,7 @@ impl<'a> Type<'a> { } } -fn rule(a: Const, b: Const) -> Result { +fn function_check(a: Const, b: Const) -> Result { use dhall_core::Const::*; match (a, b) { (_, Type) => Ok(Type), @@ -121,23 +121,22 @@ fn rule(a: Const, b: Const) -> Result { } } -fn match_vars(vl: &V