summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-03-08 14:22:03 +0100
committerNadrieril2019-03-08 14:22:03 +0100
commit7f9d988a3e0555123030f48f3759216ef2e14ec3 (patch)
treeb7e1c0107ec5a76b9da4d04415b63efb4c59fdea /dhall
parent465c3d2b97cfebcf47cbcef1dc847e592d31f434 (diff)
Generalise Context on its type of keys
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/typecheck.rs8
1 files changed, 4 insertions, 4 deletions
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<Expr<'i, S, X>, 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 {