From 330f063e80a51f8f399864f9d01412e1bff34fe9 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 11 Nov 2019 12:43:09 +0000 Subject: Display first pretty type error --- dhall/src/error/mod.rs | 8 +++---- dhall/src/phase/typecheck.rs | 2 +- dhall/src/tests.rs | 25 +++++++++++++++++++++- dhall/tests/type-errors/unit/AssertAlphaTrap.txt | 7 +++++- .../unit/UnionDeprecatedConstructorsKeyword.txt | 7 +++++- dhall/tests/type-errors/unit/VariableFree.txt | 7 +++++- 6 files changed, 47 insertions(+), 9 deletions(-) (limited to 'dhall') diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs index 5338e2d..efbd578 100644 --- a/dhall/src/error/mod.rs +++ b/dhall/src/error/mod.rs @@ -1,6 +1,6 @@ use std::io::Error as IOError; -use dhall_syntax::{BinOp, Import, Label, ParseError, V}; +use dhall_syntax::{BinOp, Import, Label, ParseError, Span}; use crate::core::context::TypecheckContext; use crate::core::value::Value; @@ -48,7 +48,7 @@ pub struct TypeError { /// The specific type error #[derive(Debug)] pub(crate) enum TypeMessage { - UnboundVariable(V