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

Changes in error messages when fixing Trac #8649

Mostly improvements, happily
parent 91252ef0
data main::Interactive.T = A | ...
-- Defined at <interactive>:3:10
data Ghci1.T = A | ... -- Defined at <interactive>:3:10
......@@ -3,5 +3,4 @@ data T = A {a :: Int} -- Defined at <interactive>:3:13
a :: Integer -- Defined at <interactive>:6:5
3
data R = B {a :: Int} -- Defined at <interactive>:9:13
data T = A {main::Interactive.a :: Int}
-- Defined at <interactive>:3:1
data T = A {Ghci1.a :: Int} -- Defined at <interactive>:3:1
<interactive>:7:9:
Couldn't match type ‛T’ with ‛main::Interactive.T’
Couldn't match type ‛T’
with ‛Ghci1.T’
NB: ‛T’ is defined at <interactive>:6:1-16
‛Ghci1.T’ is defined at <interactive>:3:1-14
Expected type: T'
Actual type: T
In the expression: C :: T'
......
data T = C | D -- Defined at <interactive>:9:1
type T' = main::Interactive.T -- Defined at <interactive>:4:1
data main::Interactive.T = A | ...
-- Defined at <interactive>:3:10
data main::Interactive.T = B | ...
-- Defined at <interactive>:6:12
type T' = Ghci1.T -- Defined at <interactive>:4:1
data Ghci1.T = A | ... -- Defined at <interactive>:3:10
data Ghci4.T = B | ... -- Defined at <interactive>:6:12
data T = C | ... -- Defined at <interactive>:9:14
data T = ... | D -- Defined at <interactive>:9:18
b :: T' -- Defined at <interactive>:5:5
c :: main::Interactive.T -- Defined at <interactive>:8:5
c :: Ghci4.T -- Defined at <interactive>:8:5
d :: T -- Defined at <interactive>:10:5
<interactive>:9:4:
Couldn't match expected type ‛main::Interactive.Planet’
Couldn't match expected type ‛Ghci1.Planet’
with actual type ‛Planet’
NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive
‛Planet’ is defined in ‛:Interactive
NB: ‛Ghci1.Planet’ is defined at <interactive>:5:1-37
‛Planet’ is defined at <interactive>:8:1-36
In the first argument of ‛pn’, namely ‛Mercury’
In the expression: pn Mercury
<interactive>:10:4:
Couldn't match expected type ‛main::Interactive.Planet’
Couldn't match expected type ‛Ghci1.Planet’
with actual type ‛Planet’
NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive
‛Planet’ is defined in ‛:Interactive
NB: ‛Ghci1.Planet’ is defined at <interactive>:5:1-37
‛Planet’ is defined at <interactive>:8:1-36
In the first argument of ‛pn’, namely ‛Venus’
In the expression: pn Venus
<interactive>:11:4:
Couldn't match expected type ‛main::Interactive.Planet’
Couldn't match expected type ‛Ghci1.Planet’
with actual type ‛Planet’
NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive
‛Planet’ is defined in ‛:Interactive
NB: ‛Ghci1.Planet’ is defined at <interactive>:5:1-37
‛Planet’ is defined at <interactive>:8:1-36
In the first argument of ‛pn’, namely ‛Mars’
In the expression: pn Mars
<interactive>:13:44:
Couldn't match expected type ‛Planet’
with actual type ‛main::Interactive.Planet’
NB: ‛Planet’ is defined in ‛:Interactive
main::Interactive.Planet’ is defined in ‛:Interactive
with actual type ‛Ghci1.Planet’
NB: ‛Planet’ is defined at <interactive>:8:1-36
Ghci1.Planet’ is defined at <interactive>:5:1-37
In the pattern: Earth
In an equation for ‛pn’: pn Earth = "E"
<interactive>:10:12:
Couldn't match expected type ‛main::Interactive.Planet’
Couldn't match expected type ‛Ghci1.Planet’
with actual type ‛Planet’
NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive
‛Planet’ is defined in ‛:Interactive
NB: ‛Ghci1.Planet’ is defined at <interactive>:5:1-49
‛Planet’ is defined at <interactive>:8:1-41
In the second argument of ‛(==)’, namely ‛Mercury’
In the expression: mercury == Mercury
<interactive>:12:10:
Couldn't match expected type ‛Planet’
with actual type ‛main::Interactive.Planet’
NB: ‛Planet’ is defined in ‛:Interactive
main::Interactive.Planet’ is defined in ‛:Interactive
with actual type ‛Ghci1.Planet’
NB: ‛Planet’ is defined at <interactive>:8:1-41
Ghci1.Planet’ is defined at <interactive>:5:1-49
In the second argument of ‛(==)’, namely ‛Earth’
In the expression: Venus == Earth
......@@ -2,7 +2,7 @@
mod180.hs:8:5:
Couldn't match expected type ‛T’
with actual type ‛main:Mod180_A.T’
NB: ‛T’ is defined in ‛Mod180_B
‛main:Mod180_A.T’ is defined in ‛Mod180_A
NB: ‛T’ is defined at Mod180_B.hs:3:1-10
‛main:Mod180_A.T’ is defined at Mod180_A.hs:3:1-10
In the expression: x
In an equation for ‛z’: z = x
[InstanceD [EqualP (VarT y_0) (AppT (AppT ArrowT (VarT t_1)) (VarT t_1))] (AppT (ConT :Interactive.Member) (ConT GHC.Types.Bool)) []]
[SigD f_2 (ForallT [PlainTV y_3,PlainTV t_4] [EqualP (VarT y_3) (AppT (AppT ArrowT (VarT t_4)) (VarT t_4))] (AppT (AppT ArrowT (VarT y_3)) (VarT t_4))),FunD f_2 [Clause [VarP x_5] (NormalB (VarE x_5)) []]]
[InstanceD [EqualP (VarT y_0) (AppT (AppT ArrowT (VarT t_1)) (VarT t_1))] (AppT (ConT Ghci1.Member) (ConT GHC.Types.Bool)) []]
[SigD f_2 (ForallT [PlainTV y_3,PlainTV t_4] [EqualP (VarT y_3) (AppT (AppT ArrowT (VarT t_4)) (VarT t_4))] (AppT (AppT ArrowT (VarT y_3)) (VarT t_4))),FunD f_2 [Clause [VarP x_5] (NormalB (VarE x_5)) []]]
......@@ -3,7 +3,7 @@ tcfail182.hs:9:3:
Couldn't match expected type ‛Prelude.Maybe a’
with actual type ‛Maybe t0’
NB: ‛Prelude.Maybe’ is defined in ‛Data.Maybe’ in package ‛base’
‛Maybe’ is defined in ‛Foo’
‛Maybe’ is defined at tcfail182.hs:6:1-18
Relevant bindings include
f :: Prelude.Maybe a -> Int (bound at tcfail182.hs:9:1)
In the pattern: Foo
......
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