Commit d5bd2d37 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Wibbles to error messages, following the fix for Trac #7851

In effect, the error context for naked variables now takes up
a "slot" in the context stack; but it is often empty.  So the
context stack becomes one shorter in those cases.  I don't think
this matters; indeed, it's aguably an improvement.  Anyway that's
why so many tests are affected.
parent f5d36751
......@@ -3,4 +3,3 @@ annfail07.hs:9:17:
Couldn't match expected type ‛[a0]’ with actual type ‛Bool’
In the first argument of ‛head’, namely ‛True’
In the expression: (head True)
In the annotation: {-# ANN f (head True) #-}
......@@ -11,8 +11,6 @@ T5380.hs:7:27:
b :: not_bool (bound at T5380.hs:7:7)
In the expression: b
In the expression: proc () -> if b then f -< () else f -< ()
In an equation for ‛testB’:
testB b f = proc () -> if b then f -< () else f -< ()
T5380.hs:7:34:
Couldn't match type ‛not_unit’ with ‛()’
......@@ -27,5 +25,3 @@ T5380.hs:7:34:
(bound at T5380.hs:7:1)
In the expression: f
In the expression: proc () -> if b then f -< () else f -< ()
In an equation for ‛testB’:
testB b f = proc () -> if b then f -< () else f -< ()
......@@ -16,6 +16,3 @@ T3169.hs:13:22:
m :: Map (a, b) elt (bound at T3169.hs:12:17)
In the second argument of ‛lookup’, namely ‛m’
In the expression: lookup a m :: Maybe (Map b elt)
In the expression:
case lookup a m :: Maybe (Map b elt) of {
Just (m2 :: Map b elt) -> lookup b m2 :: Maybe elt }
......@@ -15,5 +15,3 @@ gadt-escape1.hs:19:58:
weird1 :: t (bound at gadt-escape1.hs:19:1)
In the expression: a
In a case alternative: Hidden (ExpInt _) a -> a
In the expression:
case (hval :: Hidden) of { Hidden (ExpInt _) a -> a }
......@@ -17,4 +17,3 @@ gadt7.hs:16:38:
y1 :: t1 (bound at gadt7.hs:16:16)
In the expression: y1
In a case alternative: K -> y1
In the expression: case t1 of { K -> y1 }
......@@ -25,4 +25,3 @@ rw.hs:19:51:
ref :: IORef a (bound at rw.hs:17:12)
In the second argument of ‛(.)’, namely ‛not’
In the second argument of ‛(>>=)’, namely ‛(print . not)’
In the expression: readIORef ref >>= (print . not)
......@@ -51,14 +51,12 @@
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
In the expression: x
In the expression: (x, 'c')
In an equation for ‛h’: h x = (x, 'c')
../../typecheck/should_run/Defer01.hs:39:17: Warning:
Couldn't match expected type ‛Bool’ with actual type ‛T a’
Relevant bindings include
i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
In the return type of a call of ‛K’
In the first argument of ‛not’, namely ‛(K a)’
In the expression: (not (K a))
......@@ -105,9 +103,9 @@
../../typecheck/should_run/Defer01.hs:49:5: Warning:
Couldn't match expected type ‛IO a0’
with actual type ‛Char -> IO ()’
Probable cause: ‛putChar’ is applied to too few arguments
In the first argument of ‛(>>)’, namely ‛putChar’
In the expression: putChar >> putChar 'p'
In an equation for ‛l’: l = putChar >> putChar 'p'
*** Exception: ../../typecheck/should_run/Defer01.hs:11:40:
Couldn't match type ‛Char’ with ‛[Char]’
Expected type: String
......@@ -131,7 +129,6 @@
Couldn't match type ‛Bool’ with ‛Int’
Expected type: C Int
Actual type: C Bool
In the return type of a call of ‛C2’
In the first argument of ‛c’, namely ‛(C2 True)’
In the first argument of ‛print’, namely ‛(c (C2 True))’
*** Exception: ../../typecheck/should_run/Defer01.hs:28:5:
......@@ -159,14 +156,12 @@
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
In the expression: x
In the expression: (x, 'c')
In an equation for ‛h’: h x = (x, 'c')
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:39:17:
Couldn't match expected type ‛Bool’ with actual type ‛T a’
Relevant bindings include
i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
In the return type of a call of ‛K’
In the first argument of ‛not’, namely ‛(K a)’
In the expression: (not (K a))
(deferred type error)
......@@ -184,7 +179,7 @@
*** Exception: ../../typecheck/should_run/Defer01.hs:49:5:
Couldn't match expected type ‛IO a0’
with actual type ‛Char -> IO ()’
Probable cause: ‛putChar’ is applied to too few arguments
In the first argument of ‛(>>)’, namely ‛putChar’
In the expression: putChar >> putChar 'p'
In an equation for ‛l’: l = putChar >> putChar 'p'
(deferred type error)
......@@ -11,4 +11,3 @@
b :: a (bound at <interactive>:6:43)
In the expression: a
In the expression: [a, b]
In an equation for ‛asList’: asList (a, b) = [a, b]
......@@ -4,21 +4,18 @@
with actual type ‛Planet’
In the first argument of ‛pn’, namely ‛Mercury’
In the expression: pn Mercury
In an equation for ‛it’: it = pn Mercury
<interactive>:8:4:
Couldn't match expected type ‛main::Interactive.Planet’
with actual type ‛Planet’
In the first argument of ‛pn’, namely ‛Venus’
In the expression: pn Venus
In an equation for ‛it’: it = pn Venus
<interactive>:9:4:
Couldn't match expected type ‛main::Interactive.Planet’
with actual type ‛Planet’
In the first argument of ‛pn’, namely ‛Mars’
In the expression: pn Mars
In an equation for ‛it’: it = pn Mars
<interactive>:11:44:
Couldn't match expected type ‛Planet’
......
......@@ -4,11 +4,9 @@
with actual type ‛Planet’
In the second argument of ‛(==)’, namely ‛Mercury’
In the expression: mercury == Mercury
In an equation for ‛it’: it = mercury == Mercury
<interactive>:10:10:
Couldn't match expected type ‛Planet’
with actual type ‛main::Interactive.Planet’
In the second argument of ‛(==)’, namely ‛Earth’
In the expression: Venus == Earth
In an equation for ‛it’: it = Venus == Earth
......@@ -18,4 +18,3 @@ GADTwrong1.hs:12:19:
y :: a1 (bound at GADTwrong1.hs:12:14)
In the expression: y
In a case alternative: T y -> y
In the expression: case T x :: T (Const b) of { T y -> y }
......@@ -7,6 +7,5 @@ Overlap9.hs:11:7:
Relevant bindings include
g :: a -> F a (bound at Overlap9.hs:11:1)
x :: a (bound at Overlap9.hs:11:3)
In the return type of a call of ‛length’
In the expression: length (show x)
In an equation for ‛g’: g x = length (show x)
......@@ -11,7 +11,6 @@ T2544.hs:15:18:
empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:15:4)
In the first argument of ‛BiApp’, namely ‛empty’
In the expression: BiApp empty empty
In an equation for ‛empty’: empty = BiApp empty empty
T2544.hs:15:24:
Could not deduce (IxMap i1 ~ IxMap r)
......@@ -25,4 +24,3 @@ T2544.hs:15:24:
empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:15:4)
In the second argument of ‛BiApp’, namely ‛empty’
In the expression: BiApp empty empty
In an equation for ‛empty’: empty = BiApp empty empty
......@@ -20,7 +20,6 @@ T2693.hs:19:15:
Relevant bindings include n :: a2 (bound at T2693.hs:19:7)
In the first argument of ‛fst’, namely ‛x’
In the first argument of ‛(+)’, namely ‛fst x’
In the expression: fst x + snd x
T2693.hs:19:23:
Couldn't match expected type ‛(a4, a2)’ with actual type ‛TFn a5’
......@@ -28,7 +27,6 @@ T2693.hs:19:23:
Relevant bindings include n :: a2 (bound at T2693.hs:19:7)
In the first argument of ‛snd’, namely ‛x’
In the second argument of ‛(+)’, namely ‛snd x’
In the expression: fst x + snd x
T2693.hs:29:20:
Couldn't match type ‛TFn a0’ with ‛PVR a1’
......@@ -37,7 +35,3 @@ T2693.hs:29:20:
Actual type: () -> Maybe (TFn a0)
In the first argument of ‛mapM’, namely ‛g’
In a stmt of a 'do' block: pvs <- mapM g undefined
In the expression:
do { pvs <- mapM g undefined;
let n = (map pvrX pvs) `min` (map pvrX pvs);
undefined }
......@@ -14,7 +14,6 @@ T3330a.hs:19:34:
x :: PF s r ix (bound at T3330a.hs:19:12)
In the first argument of ‛hmapM’, namely ‛p’
In the first argument of ‛execWriter’, namely ‛(hmapM p collect x)’
In the expression: execWriter (hmapM p collect x)
T3330a.hs:19:34:
Couldn't match type ‛s’ with ‛(->) (s0 ix0 -> ix1)’
......@@ -30,7 +29,6 @@ T3330a.hs:19:34:
x :: PF s r ix (bound at T3330a.hs:19:12)
In the first argument of ‛hmapM’, namely ‛p’
In the first argument of ‛execWriter’, namely ‛(hmapM p collect x)’
In the expression: execWriter (hmapM p collect x)
T3330a.hs:19:44:
Couldn't match type ‛ix’ with ‛r0 ix0 -> Writer [AnyF s0] (r0 ix0)’
......@@ -45,4 +43,3 @@ T3330a.hs:19:44:
x :: PF s r ix (bound at T3330a.hs:19:12)
In the third argument of ‛hmapM’, namely ‛x’
In the first argument of ‛execWriter’, namely ‛(hmapM p collect x)’
In the expression: execWriter (hmapM p collect x)
T3330c.hs:23:43:
Could not deduce (f1 ~ f1 x)
from the context (f ~ (f1 :+: g))
bound by a pattern with constructor
RSum :: forall (f :: * -> *) (g :: * -> *).
R f -> R g -> R (f :+: g),
in an equation for ‛plug'’
at T3330c.hs:23:8-17
‛f1’ is a rigid type variable bound by
a pattern with constructor
RSum :: forall (f :: * -> *) (g :: * -> *).
R f -> R g -> R (f :+: g),
in an equation for ‛plug'’
at T3330c.hs:23:8
Expected type: Der ((->) x) (f1 x)
Actual type: R f1
Relevant bindings include
plug' :: R f -> Der f x -> x -> f x (bound at T3330c.hs:23:1)
rf :: R f1 (bound at T3330c.hs:23:13)
df :: f1 x (bound at T3330c.hs:23:25)
x :: x (bound at T3330c.hs:23:29)
In the first argument of ‛plug’, namely ‛rf’
In the first argument of ‛Inl’, namely ‛(plug rf df x)’
In the expression: Inl (plug rf df x)
T3330c.hs:23:43:
Could not deduce (f1 ~ f1 x)
from the context (f ~ (f1 :+: g))
bound by a pattern with constructor
RSum :: forall (f :: * -> *) (g :: * -> *).
R f -> R g -> R (f :+: g),
in an equation for ‛plug'’
at T3330c.hs:23:8-17
‛f1’ is a rigid type variable bound by
a pattern with constructor
RSum :: forall (f :: * -> *) (g :: * -> *).
R f -> R g -> R (f :+: g),
in an equation for ‛plug'’
at T3330c.hs:23:8
Expected type: Der ((->) x) (f1 x)
Actual type: R f1
Relevant bindings include
plug' :: R f -> Der f x -> x -> f x (bound at T3330c.hs:23:1)
rf :: R f1 (bound at T3330c.hs:23:13)
df :: f1 x (bound at T3330c.hs:23:25)
x :: x (bound at T3330c.hs:23:29)
In the first argument of ‛plug’, namely ‛rf’
In the first argument of ‛Inl’, namely ‛(plug rf df x)’
......@@ -20,4 +20,3 @@ T3440.hs:11:22:
y :: Fam a1 (bound at T3440.hs:11:16)
In the expression: x
In the expression: (x, y)
In an equation for ‛unwrap’: unwrap (GADT x y) = (x, y)
......@@ -10,6 +10,5 @@ T4093a.hs:8:8:
Expected type: Foo e
Actual type: Maybe ()
Relevant bindings include hang :: Foo e (bound at T4093a.hs:8:1)
In the return type of a call of ‛Just’
In the expression: Just ()
In an equation for ‛hang’: hang = Just ()
......@@ -9,7 +9,6 @@ T4099.hs:11:30:
x :: T b (bound at T4099.hs:11:8)
In the second argument of ‛foo’, namely ‛x’
In the expression: foo (error "urk") x
In an equation for ‛bar1’: bar1 a x = foo (error "urk") x
T4099.hs:14:30:
Couldn't match expected type ‛T a1’ with actual type ‛Maybe b’
......@@ -20,4 +19,3 @@ T4099.hs:14:30:
x :: Maybe b (bound at T4099.hs:14:8)
In the second argument of ‛foo’, namely ‛x’
In the expression: foo (error "urk") x
In an equation for ‛bar2’: bar2 a x = foo (error "urk") x
......@@ -18,4 +18,3 @@ T4179.hs:26:16:
(bound at T4179.hs:26:1)
In the first argument of ‛foldDoC’, namely ‛op’
In the expression: foldDoC op
In an equation for ‛fCon’: fCon = foldDoC op
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment