From 0e16cbf34d5d882c6f4800295db5fa5e2b42c342 Mon Sep 17 00:00:00 2001
From: Simon Peyton Jones
Date: Fri, 26 Sep 2014 10:54:23 +0100
Subject: [PATCH] Two improved error messages
I'm not quite sure why these have improved following the previous
four commits, but I'm quite happy about it
---
.../tests/indexed-types/should_fail/T8227.stderr | 14 ++++++--------
.../tests/indexed-types/should_fail/T8518.stderr | 19 +++++++++++++++++++
2 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/testsuite/tests/indexed-types/should_fail/T8227.stderr b/testsuite/tests/indexed-types/should_fail/T8227.stderr
index 8d490d6..6bea619 100644
--- a/testsuite/tests/indexed-types/should_fail/T8227.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T8227.stderr
@@ -1,15 +1,13 @@
-T8227.hs:16:27:
- Couldn't match type âScalar (V (Scalar (V a)))â with âScalar (V a)â
- NB: âScalarâ is a type function, and may not be injective
- Expected type: Scalar (V a)
- Actual type: Scalar (V (Scalar (V a)))
- -> Scalar (V (Scalar (V a)))
+T8227.hs:16:44:
+ Couldn't match type âScalar (V a)â
+ with âScalar (V a) -> Scalar (V a)â
+ Expected type: Scalar (V (Scalar (V a)))
+ Actual type: Scalar (V a)
Relevant bindings include
seg :: a (bound at T8227.hs:16:21)
eps :: Scalar (V a) (bound at T8227.hs:16:17)
absoluteToParam :: Scalar (V a) -> a -> Scalar (V a)
(bound at T8227.hs:16:1)
+ In the first argument of âarcLengthToParamâ, namely âepsâ
In the expression: arcLengthToParam eps eps
- In an equation for âabsoluteToParamâ:
- absoluteToParam eps seg = arcLengthToParam eps eps
diff --git a/testsuite/tests/indexed-types/should_fail/T8518.stderr b/testsuite/tests/indexed-types/should_fail/T8518.stderr
index e5ef99e..d7c2010 100644
--- a/testsuite/tests/indexed-types/should_fail/T8518.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T8518.stderr
@@ -1,4 +1,23 @@
+T8518.hs:14:18:
+ Could not deduce (F c ~ Maybe (F c))
+ from the context (Continuation c)
+ bound by the type signature for
+ callCont :: Continuation c => c -> Z c -> B c -> Maybe (F c)
+ at T8518.hs:13:13-64
+ Relevant bindings include
+ b :: B c (bound at T8518.hs:14:14)
+ z :: Z c (bound at T8518.hs:14:12)
+ c :: c (bound at T8518.hs:14:10)
+ callCont :: c -> Z c -> B c -> Maybe (F c) (bound at T8518.hs:14:1)
+ In the expression: rpt (4 :: Int) c z b
+ In an equation for âcallContâ:
+ callCont c z b
+ = rpt (4 :: Int) c z b
+ where
+ rpt 0 c' z' b' = fromJust (fst <$> (continue c' z' b'))
+ rpt i c' z' b' = let ... in rpt (i - 1) c''
+
T8518.hs:17:78:
Could not deduce (F a1 ~ (Z a1 -> B a1 -> F a1))
from the context (Continuation c)
--
1.9.1