From 7f9d988a3e0555123030f48f3759216ef2e14ec3 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 8 Mar 2019 14:22:03 +0100 Subject: Generalise Context on its type of keys --- dhall/src/typecheck.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dhall') diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs index e36a6fa..23ab7a6 100644 --- a/dhall/src/typecheck.rs +++ b/dhall/src/typecheck.rs @@ -146,7 +146,7 @@ where } fn op2_type<'i, S, EF>( - ctx: &Context<'i, Expr<'i, S, X>>, + ctx: &Context<&'i str, Expr<'i, S, X>>, e: &Expr<'i, S, X>, t: core::Builtin, ef: EF, @@ -179,7 +179,7 @@ where /// is not necessary for just type-checking. If you actually care about the /// returned type then you may want to `normalize` it afterwards. pub fn type_with<'i, S>( - ctx: &Context<'i, Expr<'i, S, X>>, + ctx: &Context<&'i str, Expr<'i, S, X>>, e: &Expr<'i, S, X>, ) -> Result, TypeError<'i, S>> where @@ -773,14 +773,14 @@ pub enum TypeMessage<'i, S> { /// A structured type error that includes context #[derive(Debug)] pub struct TypeError<'i, S> { - pub context: Context<'i, Expr<'i, S, X>>, + pub context: Context<&'i str, Expr<'i, S, X>>, pub current: Expr<'i, S, X>, pub type_message: TypeMessage<'i, S>, } impl<'i, S: Clone> TypeError<'i, S> { pub fn new( - context: &Context<'i, Expr<'i, S, X>>, + context: &Context<&'i str, Expr<'i, S, X>>, current: &Expr<'i, S, X>, type_message: TypeMessage<'i, S>, ) -> Self { -- cgit v1.2.3