diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-02 18:00:28 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-02 18:00:28 +0100 |
commit | 87a5ef5f2cc20acde5febae1e3ce6989caf8accc (patch) | |
tree | 01f15aa64cd3a6e735f0ee04ea8e6d6ce128eaf2 | |
parent | b65f16d0055032077867a1cf804543ff83f0b35f (diff) | |
download | haskell-87a5ef5f2cc20acde5febae1e3ce6989caf8accc.tar.gz |
Error message changes due to pretty-printing of provenances
22 files changed, 95 insertions, 63 deletions
diff --git a/testsuite/tests/module/mod110.stderr b/testsuite/tests/module/mod110.stderr index c371bc1bd7..e1c2eb1b0b 100644 --- a/testsuite/tests/module/mod110.stderr +++ b/testsuite/tests/module/mod110.stderr @@ -2,4 +2,6 @@ mod110.hs:11:10: Ambiguous occurrence `Eq' It could refer to either `M.Eq', defined at mod110.hs:7:7 - or `Prelude.Eq', imported from Prelude at mod110.hs:4:1-14 + or `Prelude.Eq', + imported from `Prelude' at mod110.hs:4:1-14 + (and originally defined in `GHC.Classes') diff --git a/testsuite/tests/module/mod131.stderr b/testsuite/tests/module/mod131.stderr index 5dcc5efab8..15d9190464 100644 --- a/testsuite/tests/module/mod131.stderr +++ b/testsuite/tests/module/mod131.stderr @@ -1,7 +1,9 @@ mod131.hs:2:27: Conflicting exports for `f': - `module Mod131_B' exports `f' imported from Mod131_B at mod131.hs:3:17 - (defined at Mod131_B.hs:3:1) - `Mod131_A.f' exports `Mod131_A.f' imported from Mod131_A at mod131.hs:4:27 - (defined at Mod131_A.hs:3:1) + `module Mod131_B' exports `f' + imported from `Mod131_B' at mod131.hs:3:17 + (and originally defined at Mod131_B.hs:3:1) + `Mod131_A.f' exports `Mod131_A.f' + imported qualified from `Mod131_A' at mod131.hs:4:27 + (and originally defined at Mod131_A.hs:3:1) diff --git a/testsuite/tests/module/mod142.stderr b/testsuite/tests/module/mod142.stderr index c1c4023e1e..fcd7665aaa 100644 --- a/testsuite/tests/module/mod142.stderr +++ b/testsuite/tests/module/mod142.stderr @@ -1,6 +1,7 @@ mod142.hs:2:21: Conflicting exports for `x': - `module Mod142_A' exports `Mod142_A.x' imported from Mod142_A at mod142.hs:4:1-15 - (defined at Mod142_A.hs:3:1) - `module M' exports `M.x' defined at mod142.hs:6:1 + `module Mod142_A' exports `Mod142_A.x' + imported from `Mod142_A' at mod142.hs:4:1-15 + (and originally defined at Mod142_A.hs:3:1) + `module M' exports `M.x' defined at mod142.hs:6:1 diff --git a/testsuite/tests/module/mod143.stderr b/testsuite/tests/module/mod143.stderr index e74bc238e1..15042a21d8 100644 --- a/testsuite/tests/module/mod143.stderr +++ b/testsuite/tests/module/mod143.stderr @@ -1,6 +1,7 @@ mod143.hs:2:21: Conflicting exports for `Foo': - `module Mod143_A' exports `Mod143_A.Foo' imported from Mod143_A at mod143.hs:4:1-15 - (defined at Mod143_A.hs:3:6) - `module M' exports `M.Foo' defined at mod143.hs:6:6 + `module Mod143_A' exports `Mod143_A.Foo' + imported from `Mod143_A' at mod143.hs:4:1-15 + (and originally defined at Mod143_A.hs:3:6-8) + `module M' exports `M.Foo' defined at mod143.hs:6:6 diff --git a/testsuite/tests/module/mod144.stderr b/testsuite/tests/module/mod144.stderr index e97acdc528..87c49abde1 100644 --- a/testsuite/tests/module/mod144.stderr +++ b/testsuite/tests/module/mod144.stderr @@ -1,6 +1,7 @@ mod144.hs:2:27: Conflicting exports for `Bar': - `module Mod144_A' exports `Mod144_A.Bar' imported from Mod144_A at mod144.hs:4:1-15 - `module M' exports `M.Bar' defined at mod144.hs:6:13 + `module Mod144_A' exports `Mod144_A.Bar' + imported from `Mod144_A' at mod144.hs:4:1-15 + `module M' exports `M.Bar' defined at mod144.hs:6:13 exit(1) diff --git a/testsuite/tests/module/mod145.stderr b/testsuite/tests/module/mod145.stderr index 47cb0e61cb..fcbf0b6731 100644 --- a/testsuite/tests/module/mod145.stderr +++ b/testsuite/tests/module/mod145.stderr @@ -1,6 +1,7 @@ mod145.hs:2:30: Conflicting exports for `m1': - `module Mod145_A' exports `Mod145_A.m1' imported from Mod145_A at mod145.hs:4:1-15 - (defined at Mod145_A.hs:4:3) - `module Mod145' exports `Mod145.m1' defined at mod145.hs:7:3 + `module Mod145_A' exports `Mod145_A.m1' + imported from `Mod145_A' at mod145.hs:4:1-15 + (and originally defined at Mod145_A.hs:4:3-4) + `module Mod145' exports `Mod145.m1' defined at mod145.hs:7:3 diff --git a/testsuite/tests/module/mod146.stderr b/testsuite/tests/module/mod146.stderr index d43f33feb3..ef99dc3ca5 100644 --- a/testsuite/tests/module/mod146.stderr +++ b/testsuite/tests/module/mod146.stderr @@ -1,6 +1,7 @@ mod146.hs:2:30: Conflicting exports for `m1': - `module Mod145_A' exports `Mod145_A.m1' imported from Mod145_A at mod146.hs:4:1-15 - `module Mod146' exports `Mod146.m1' defined at mod146.hs:7:3 + `module Mod145_A' exports `Mod145_A.m1' + imported from `Mod145_A' at mod146.hs:4:1-15 + `module Mod146' exports `Mod146.m1' defined at mod146.hs:7:3 exit(1) diff --git a/testsuite/tests/module/mod150.stderr b/testsuite/tests/module/mod150.stderr index 1b410fd0a1..8ddd686940 100644 --- a/testsuite/tests/module/mod150.stderr +++ b/testsuite/tests/module/mod150.stderr @@ -1,5 +1,7 @@ mod150.hs:2:20: Conflicting exports for `id': - `module Prelude' exports `Prelude.id' imported from Prelude at mod150.hs:2:8 - `module M' exports `M.id' defined at mod150.hs:2:42 + `module Prelude' exports `Prelude.id' + imported from `Prelude' at mod150.hs:2:8 + (and originally defined in `GHC.Base') + `module M' exports `M.id' defined at mod150.hs:2:42 diff --git a/testsuite/tests/module/mod151.stderr b/testsuite/tests/module/mod151.stderr index c8d8ce87dc..3206da9de0 100644 --- a/testsuite/tests/module/mod151.stderr +++ b/testsuite/tests/module/mod151.stderr @@ -2,4 +2,6 @@ mod151.hs:2:20: Ambiguous occurrence `id' It could refer to either `M.id', defined at mod151.hs:2:30 - or `Prelude.id', imported from Prelude at mod151.hs:2:8 + or `Prelude.id', + imported from `Prelude' at mod151.hs:2:8 + (and originally defined in `GHC.Base') diff --git a/testsuite/tests/module/mod152.stderr b/testsuite/tests/module/mod152.stderr index dd21f8cf67..1ad302287f 100644 --- a/testsuite/tests/module/mod152.stderr +++ b/testsuite/tests/module/mod152.stderr @@ -2,9 +2,13 @@ mod152.hs:2:26: Ambiguous occurrence `id' It could refer to either `M.id', defined at mod152.hs:2:36 - or `Prelude.id', imported from Prelude at mod152.hs:2:8 + or `Prelude.id', + imported from `Prelude' at mod152.hs:2:8 + (and originally defined in `GHC.Base') mod152.hs:2:26: Conflicting exports for `id': - `module Prelude' exports `Prelude.id' imported from Prelude at mod152.hs:2:8 - `id' exports `M.id' defined at mod152.hs:2:36 + `module Prelude' exports `Prelude.id' + imported from `Prelude' at mod152.hs:2:8 + (and originally defined in `GHC.Base') + `id' exports `M.id' defined at mod152.hs:2:36 diff --git a/testsuite/tests/module/mod153.stderr b/testsuite/tests/module/mod153.stderr index d3a8b9b6a9..da4751b7b4 100644 --- a/testsuite/tests/module/mod153.stderr +++ b/testsuite/tests/module/mod153.stderr @@ -2,4 +2,6 @@ mod153.hs:2:11: Ambiguous occurrence `id' It could refer to either `M.id', defined at mod153.hs:2:21 - or `Prelude.id', imported from Prelude at mod153.hs:2:8 + or `Prelude.id', + imported from `Prelude' at mod153.hs:2:8 + (and originally defined in `GHC.Base') diff --git a/testsuite/tests/module/mod155.stderr b/testsuite/tests/module/mod155.stderr index a6a732c5b8..889e9772c9 100644 --- a/testsuite/tests/module/mod155.stderr +++ b/testsuite/tests/module/mod155.stderr @@ -1,5 +1,7 @@ mod155.hs:2:10: Conflicting exports for `id': - `module M' exports `M.id' imported from Prelude at mod155.hs:4:1-19 - `module M' exports `M.id' defined at mod155.hs:5:1 + `module M' exports `M.id' + imported from `Prelude' at mod155.hs:4:1-19 + (and originally defined in `GHC.Base') + `module M' exports `M.id' defined at mod155.hs:5:1 diff --git a/testsuite/tests/module/mod164.stderr b/testsuite/tests/module/mod164.stderr index 7a014187ac..5f18adc025 100644 --- a/testsuite/tests/module/mod164.stderr +++ b/testsuite/tests/module/mod164.stderr @@ -1,7 +1,9 @@ mod164.hs:9:5: Ambiguous occurrence `D1' - It could refer to either `Mod164_A.D1', imported from Mod164_A at mod164.hs:4:1-15 - (defined at Mod164_A.hs:3:10) - or `Mod164_B.D1', imported from Mod164_B at mod164.hs:5:1-15 - (defined at Mod164_B.hs:3:10) + It could refer to either `Mod164_A.D1', + imported from `Mod164_A' at mod164.hs:4:1-15 + (and originally defined at Mod164_A.hs:3:10-11) + or `Mod164_B.D1', + imported from `Mod164_B' at mod164.hs:5:1-15 + (and originally defined at Mod164_B.hs:3:10-11) diff --git a/testsuite/tests/module/mod165.stderr b/testsuite/tests/module/mod165.stderr index 8a813594a9..293eb993cc 100644 --- a/testsuite/tests/module/mod165.stderr +++ b/testsuite/tests/module/mod165.stderr @@ -2,6 +2,6 @@ mod165.hs:9:5: Ambiguous occurrence `A.D1' It could refer to either `A.D1', - imported from Mod164_A at mod165.hs:4:1-20 - or `A.D1', imported from Mod164_B at mod165.hs:5:1-20 + imported from `Mod164_A' at mod165.hs:4:1-20 + or `A.D1', imported from `Mod164_B' at mod165.hs:5:1-20 exit(1) diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr index 4f9344c4bc..610e509402 100644 --- a/testsuite/tests/rename/should_compile/T1972.stderr +++ b/testsuite/tests/rename/should_compile/T1972.stderr @@ -6,6 +6,6 @@ T1972.hs:12:3: T1972.hs:14:3: Warning: This binding for `mapAccumL' shadows the existing bindings defined at T1972.hs:16:1 - imported from Data.List at T1972.hs:7:1-16 + imported from `Data.List' at T1972.hs:7:1-16 T1972.hs:20:10: Warning: Defined but not used: `c' diff --git a/testsuite/tests/rename/should_compile/rn039.stderr-ghc b/testsuite/tests/rename/should_compile/rn039.stderr-ghc index 5c0e229050..51adb6fa8b 100644 --- a/testsuite/tests/rename/should_compile/rn039.stderr-ghc +++ b/testsuite/tests/rename/should_compile/rn039.stderr-ghc @@ -1,4 +1,5 @@ rn039.hs:6:16: Warning: This binding for `-' shadows the existing binding - imported from Prelude at rn039.hs:2:8-20 + imported from `Prelude' at rn039.hs:2:8-20 + (and originally defined in `GHC.Num') diff --git a/testsuite/tests/rename/should_fail/rnfail029.stderr b/testsuite/tests/rename/should_fail/rnfail029.stderr index e22f4c33ae..360a9aac9e 100644 --- a/testsuite/tests/rename/should_fail/rnfail029.stderr +++ b/testsuite/tests/rename/should_fail/rnfail029.stderr @@ -1,5 +1,8 @@ rnfail029.hs:2:36: Conflicting exports for `map': - `Data.List.map' exports `Data.List.map' imported from Data.List at rnfail029.hs:3:1-26 - `module ShouldFail' exports `ShouldFail.map' defined at rnfail029.hs:4:1 + `Data.List.map' exports `Data.List.map' + imported qualified from `Data.List' at rnfail029.hs:3:1-26 + (and originally defined in `GHC.Base') + `module ShouldFail' exports `ShouldFail.map' + defined at rnfail029.hs:4:1 diff --git a/testsuite/tests/rename/should_fail/rnfail040.stderr b/testsuite/tests/rename/should_fail/rnfail040.stderr index 25e3c1153f..cacdaa8d8d 100644 --- a/testsuite/tests/rename/should_fail/rnfail040.stderr +++ b/testsuite/tests/rename/should_fail/rnfail040.stderr @@ -1,6 +1,8 @@ rnfail040.hs:7:12: Conflicting exports for `nub': - `module M' exports `M.nub' imported from Data.List at rnfail040.hs:10:2-22 - `module M' exports `T.nub' imported from Rnfail040_A at rnfail040.hs:11:2-24 - (defined at Rnfail040_A.hs:2:3) + `module M' exports `M.nub' + imported from `Data.List' at rnfail040.hs:10:2-22 + `module M' exports `T.nub' + imported from `Rnfail040_A' at rnfail040.hs:11:2-24 + (and originally defined at Rnfail040_A.hs:2:3-5) diff --git a/testsuite/tests/rename/should_fail/rnfail044.stderr b/testsuite/tests/rename/should_fail/rnfail044.stderr index 5284ac9178..48be6944d0 100644 --- a/testsuite/tests/rename/should_fail/rnfail044.stderr +++ b/testsuite/tests/rename/should_fail/rnfail044.stderr @@ -3,4 +3,5 @@ rnfail044.hs:5:12: Ambiguous occurrence `splitAt' It could refer to either `A.splitAt', defined at rnfail044.hs:8:3 or `Data.List.splitAt', - imported from Prelude at rnfail044.hs:5:8 + imported from `Prelude' at rnfail044.hs:5:8 + (and originally defined in `GHC.List') diff --git a/testsuite/tests/simplCore/should_compile/T4908.stderr b/testsuite/tests/simplCore/should_compile/T4908.stderr index ac90d0f5db..1654c2e380 100644 --- a/testsuite/tests/simplCore/should_compile/T4908.stderr +++ b/testsuite/tests/simplCore/should_compile/T4908.stderr @@ -11,10 +11,10 @@ T4908.f_$s$wf = \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Types.Int) (sc2 :: GHC.Prim.Int#) -> - case sc of ds { + case sc2 of ds { __DEFAULT -> - case sc2 of ds1 { - __DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) sc1 ds1; + case sc of ds1 { + __DEFAULT -> T4908.f_$s$wf ds1 sc1 (GHC.Prim.-# ds 1); 0 -> GHC.Types.True }; 0 -> GHC.Types.True @@ -38,7 +38,7 @@ T4908.$wf = case w of _ { (a, b) -> case b of _ { GHC.Types.I# ds1 -> case ds1 of ds2 { - __DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) a ds2; + __DEFAULT -> T4908.f_$s$wf ds2 a (GHC.Prim.-# ds 1); 0 -> GHC.Types.True } } @@ -69,7 +69,7 @@ T4908.f = forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Types.Int) (sc2 :: GHC.Prim.Int#). - T4908.$wf sc (sc1, GHC.Types.I# sc2) + T4908.$wf sc2 (sc1, GHC.Types.I# sc) = T4908.f_$s$wf sc sc1 sc2 diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr index eba8a4d696..b8f8abc87e 100644 --- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -21,19 +21,19 @@ Roman.foo_$s$wgo = GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# - (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc1 sc1) sc1) sc1) sc1) - sc1) - sc1 } in - case GHC.Prim.<=# sc 0 of _ { + (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc) + sc) + sc } in + case GHC.Prim.<=# sc1 0 of _ { GHC.Types.False -> - case GHC.Prim.<# sc 100 of _ { + case GHC.Prim.<# sc1 100 of _ { GHC.Types.False -> - case GHC.Prim.<# sc 500 of _ { + case GHC.Prim.<# sc1 500 of _ { GHC.Types.False -> - Roman.foo_$s$wgo (GHC.Prim.-# sc 1) (GHC.Prim.+# a a); - GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 3) a + Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1); + GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3) }; - GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 2) sc1 + GHC.Types.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2) }; GHC.Types.True -> 0 } @@ -69,7 +69,7 @@ Roman.$wgo = ipv) ipv } in case w of _ { - Data.Maybe.Nothing -> Roman.foo_$s$wgo 10 a; + Data.Maybe.Nothing -> Roman.foo_$s$wgo a 10; Data.Maybe.Just n -> case n of _ { GHC.Types.I# x2 -> case GHC.Prim.<=# x2 0 of _ { @@ -78,10 +78,10 @@ Roman.$wgo = GHC.Types.False -> case GHC.Prim.<# x2 500 of _ { GHC.Types.False -> - Roman.foo_$s$wgo (GHC.Prim.-# x2 1) (GHC.Prim.+# a a); - GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 3) a + Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# x2 1); + GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3) }; - GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 2) ipv + GHC.Types.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2) }; GHC.Types.True -> 0 } @@ -140,15 +140,15 @@ Roman.foo :: GHC.Types.Int -> GHC.Types.Int Roman.foo = \ (n :: GHC.Types.Int) -> case n of _ { GHC.Types.I# ipv -> - case Roman.foo_$s$wgo ipv 6 of ww { __DEFAULT -> GHC.Types.I# ww } + case Roman.foo_$s$wgo 6 ipv of ww { __DEFAULT -> GHC.Types.I# ww } } ------ Local rules for imported ids -------- "SC:$wgo0" [ALWAYS] forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#). - Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc)) - (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1)) + Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1)) + (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc)) = Roman.foo_$s$wgo sc sc1 diff --git a/testsuite/tests/typecheck/should_fail/tcfail037.stderr b/testsuite/tests/typecheck/should_fail/tcfail037.stderr index b0009e6a19..998a68ccdc 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail037.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail037.stderr @@ -3,4 +3,6 @@ tcfail037.hs:7:11: Ambiguous occurrence `+' It could refer to either `ShouldFail.+', defined at tcfail037.hs:10:5 - or `Prelude.+', imported from Prelude at tcfail037.hs:3:8-17 + or `Prelude.+', + imported from `Prelude' at tcfail037.hs:3:8-17 + (and originally defined in `GHC.Num') |