#![allow(non_snake_case)] use std::collections::HashSet; use std::fmt; use crate::normalize::normalize; use dhall_core; use dhall_core::context::Context; use dhall_core::*; use dhall_generator as dhall; use self::TypeMessage::*; fn axiom(c: Const) -> Result> { use dhall_core::Const::*; use dhall_core::ExprF::*; match c { Type => Ok(Kind), Kind => Err(TypeError::new(&Context::new(), rc(Const(Kind)), Untyped)), } } fn rule(a: Const, b: Const) -> Result { use dhall_core::Const::*; match (a, b) { (Type, Kind) => Err(()), (Kind, Kind) => Ok(Kind), (Type, Type) | (Kind, Type) => Ok(Type), } } fn match_vars(vl: &V