diff options
author | Nadrieril | 2019-04-12 16:32:29 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-12 16:32:29 +0200 |
commit | 5fcc7f69c7a68b08ff223217e8af9f8edb2cc761 (patch) | |
tree | da5c9d6e936ba97d7ccadc213ea2c5a197ebe15b /dhall/src/typecheck.rs | |
parent | edac7d46abda23c9149336586c80c62d85aced70 (diff) |
Capture `Span`s in the AST and thread them through Parsed and Resolved
Diffstat (limited to 'dhall/src/typecheck.rs')
-rw-r--r-- | dhall/src/typecheck.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs index d98095c..5a28089 100644 --- a/dhall/src/typecheck.rs +++ b/dhall/src/typecheck.rs @@ -14,19 +14,19 @@ use self::TypeMessage::*; impl<'a> Resolved<'a> { pub fn typecheck(self) -> Result<Typed<'static>, TypeError> { - type_of(self.0.clone()) + type_of(self.0.unnote()) } pub fn typecheck_with( self, ty: &Type, ) -> Result<Typed<'static>, TypeError> { - let expr: SubExpr<_, _> = self.0.clone(); + let expr: SubExpr<_, _> = self.0.unnote(); let ty: SubExpr<_, _> = ty.as_normalized()?.as_expr().absurd(); type_of(dhall::subexpr!(expr: ty)) } /// Pretends this expression has been typechecked. Use with care. pub fn skip_typecheck(self) -> Typed<'a> { - Typed(self.0, None, self.1) + Typed(self.0.unnote(), None, PhantomData) } } impl<'a> Typed<'a> { |