From 3aedef91213dac17022df54a712092aae9841131 Mon Sep 17 00:00:00 2001
From: Michal Terepeta <michal.terepeta@gmail.com>
Date: Wed, 24 Oct 2012 20:57:44 +0200
Subject: [PATCH 1/2] New output for duplicate signatures (ticket #7338)

---
 tests/module/mod68.stderr                 |  6 +++---
 tests/rename/should_fail/T5589.hs         | 17 +++++++++++++----
 tests/rename/should_fail/T5589.stderr     | 22 ++++++++++++++++++----
 tests/rename/should_fail/rnfail048.stderr | 14 +++++++-------
 4 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/tests/module/mod68.stderr b/tests/module/mod68.stderr
index 2d5ece6..ac2b8cb 100644
--- a/tests/module/mod68.stderr
+++ b/tests/module/mod68.stderr
@@ -1,5 +1,5 @@
 
-mod68.hs:4:1:
-    Duplicate type signature:
-      mod68.hs:4:1-16: f :: Int -> Bool
+mod68.hs:3:1:
+    Duplicate type signature for f:
       mod68.hs:3:1-16: f :: Int -> Bool
+      mod68.hs:4:1-16: f :: Int -> Bool
diff --git a/tests/rename/should_fail/T5589.hs b/tests/rename/should_fail/T5589.hs
index c7708e5..c85f8a5 100644
--- a/tests/rename/should_fail/T5589.hs
+++ b/tests/rename/should_fail/T5589.hs
@@ -1,6 +1,15 @@
 module T5589 where
 
-bbb, aaa :: Int
-aaa :: Int
-aaa = undefined
-bbb = undefined
+b, a :: Int
+a :: Int
+a = undefined
+b = undefined
+
+b, c :: Int
+c = undefined
+
+c, d :: Int
+d = undefined
+
+e, e :: Int
+e = undefined
diff --git a/tests/rename/should_fail/T5589.stderr b/tests/rename/should_fail/T5589.stderr
index f5f3a01..dc027f2 100644
--- a/tests/rename/should_fail/T5589.stderr
+++ b/tests/rename/should_fail/T5589.stderr
@@ -1,5 +1,19 @@
 
-T5589.hs:4:1:
-    Duplicate type signature:
-      T5589.hs:4:1-10: aaa :: Int
-      T5589.hs:3:1-15: bbb, aaa :: Int
+T5589.hs:3:1:
+    Duplicate type signature for a:
+      T5589.hs:3:1-11: b, a :: Int
+      T5589.hs:4:1-8: a :: Int
+
+T5589.hs:3:1:
+    Duplicate type signature for b:
+      T5589.hs:3:1-11: b, a :: Int
+      T5589.hs:8:1-11: b, c :: Int
+
+T5589.hs:8:1:
+    Duplicate type signature for c:
+      T5589.hs:8:1-11: b, c :: Int
+      T5589.hs:11:1-11: c, d :: Int
+
+T5589.hs:14:1:
+    Duplicate type signature for e:
+      T5589.hs:14:1-11: e, e :: Int
diff --git a/tests/rename/should_fail/rnfail048.stderr b/tests/rename/should_fail/rnfail048.stderr
index 885229d..9306be9 100644
--- a/tests/rename/should_fail/rnfail048.stderr
+++ b/tests/rename/should_fail/rnfail048.stderr
@@ -1,9 +1,9 @@
 
-rnfail048.hs:11:1:
-    Duplicate INLINE pragma:
-      rnfail048.hs:11:1-18: {-# INLINE foo #-}
-      rnfail048.hs:10:1-22: {-# INLINE[~2] foo #-}
-      rnfail048.hs:9:1-21: {-# INLINE[1] foo #-}
-      rnfail048.hs:8:1-20: {-# NOINLINE foo #-}
-      rnfail048.hs:7:1-24: {-# NOINLINE[~2] foo #-}
+rnfail048.hs:6:1:
+    Duplicate INLINE pragma for foo:
       rnfail048.hs:6:1-23: {-# NOINLINE[1] foo #-}
+      rnfail048.hs:7:1-24: {-# NOINLINE[~2] foo #-}
+      rnfail048.hs:8:1-20: {-# NOINLINE foo #-}
+      rnfail048.hs:9:1-21: {-# INLINE[1] foo #-}
+      rnfail048.hs:10:1-22: {-# INLINE[~2] foo #-}
+      rnfail048.hs:11:1-18: {-# INLINE foo #-}
-- 
1.8.0

