[commit: ghc] wip/rae: Update submodule array and the testsuite to fix #9220. (f683169)

git at git.haskell.org git at git.haskell.org
Tue Nov 11 02:30:59 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/f683169197cb651d02e022625a0f1cc7c1416974/ghc

>---------------------------------------------------------------

commit f683169197cb651d02e022625a0f1cc7c1416974
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Fri Nov 7 17:34:59 2014 -0500

    Update submodule array and the testsuite to fix #9220.


>---------------------------------------------------------------

f683169197cb651d02e022625a0f1cc7c1416974
 libraries/array                                    |   2 +-
 testsuite/tests/roles/should_compile/all.T         |   1 -
 .../{should_compile => should_fail}/RolesIArray.hs |   0
 .../tests/roles/should_fail/RolesIArray.stderr     | 100 +++++++++++++++++++++
 testsuite/tests/roles/should_fail/all.T            |   1 +
 5 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/libraries/array b/libraries/array
index 19b7aeb..86225ba 160000
--- a/libraries/array
+++ b/libraries/array
@@ -1 +1 @@
-Subproject commit 19b7aebd7dff912728029778749aaa8a9ed1cffd
+Subproject commit 86225ba71603ed73a338e5f658698fc87aadcae9
diff --git a/testsuite/tests/roles/should_compile/all.T b/testsuite/tests/roles/should_compile/all.T
index 744b934..0bd779f 100644
--- a/testsuite/tests/roles/should_compile/all.T
+++ b/testsuite/tests/roles/should_compile/all.T
@@ -4,5 +4,4 @@ test('Roles3', only_ways('normal'), compile, ['-ddump-tc'])
 test('Roles4', only_ways('normal'), compile, ['-ddump-tc'])
 test('Roles13', only_ways('normal'), compile, ['-ddump-simpl -dsuppress-uniques'])
 test('Roles14', only_ways('normal'), compile, ['-ddump-tc'])
-test('RolesIArray', only_ways('normal'), compile, [''])
 test('T8958', [normalise_fun(normalise_errmsg), only_ways('normal')], compile, ['-ddump-tc -dsuppress-uniques'])
diff --git a/testsuite/tests/roles/should_compile/RolesIArray.hs b/testsuite/tests/roles/should_fail/RolesIArray.hs
similarity index 100%
rename from testsuite/tests/roles/should_compile/RolesIArray.hs
rename to testsuite/tests/roles/should_fail/RolesIArray.hs
diff --git a/testsuite/tests/roles/should_fail/RolesIArray.stderr b/testsuite/tests/roles/should_fail/RolesIArray.stderr
new file mode 100644
index 0000000..aad2f2b
--- /dev/null
+++ b/testsuite/tests/roles/should_fail/RolesIArray.stderr
@@ -0,0 +1,100 @@
+
+RolesIArray.hs:10:13:
+    Could not coerce from ‘UArray i Word64’ to ‘UArray i N’
+      because the second type argument of ‘UArray’ has role Nominal,
+      but the arguments ‘Word64’ and ‘N’ differ
+      arising from the coercion of the method ‘Data.Array.Base.unsafeAccumArray’
+        from type ‘forall e' i.
+                   Ix i =>
+                   (Word64 -> e' -> Word64)
+                   -> Word64 -> (i, i) -> [(Int, e')] -> UArray i Word64’
+          to type ‘forall e' i.
+                   Ix i =>
+                   (N -> e' -> N) -> N -> (i, i) -> [(Int, e')] -> UArray i N’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (IArray UArray N)
+
+RolesIArray.hs:10:13:
+    Could not coerce from ‘UArray i Word64’ to ‘UArray i N’
+      because the second type argument of ‘UArray’ has role Nominal,
+      but the arguments ‘Word64’ and ‘N’ differ
+      arising from the coercion of the method ‘Data.Array.Base.unsafeAccum’
+        from type ‘forall e' i.
+                   Ix i =>
+                   (Word64 -> e' -> Word64)
+                   -> UArray i Word64 -> [(Int, e')] -> UArray i Word64’
+          to type ‘forall e' i.
+                   Ix i =>
+                   (N -> e' -> N) -> UArray i N -> [(Int, e')] -> UArray i N’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (IArray UArray N)
+
+RolesIArray.hs:10:13:
+    Could not coerce from ‘UArray i Word64’ to ‘UArray i N’
+      because the second type argument of ‘UArray’ has role Nominal,
+      but the arguments ‘Word64’ and ‘N’ differ
+      arising from the coercion of the method ‘Data.Array.Base.unsafeReplace’
+        from type ‘forall i.
+                   Ix i =>
+                   UArray i Word64 -> [(Int, Word64)] -> UArray i Word64’
+          to type ‘forall i.
+                   Ix i =>
+                   UArray i N -> [(Int, N)] -> UArray i N’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (IArray UArray N)
+
+RolesIArray.hs:10:13:
+    Could not coerce from ‘UArray i Word64’ to ‘UArray i N’
+      because the second type argument of ‘UArray’ has role Nominal,
+      but the arguments ‘Word64’ and ‘N’ differ
+      arising from the coercion of the method ‘Data.Array.Base.unsafeAt’
+        from type ‘forall i. Ix i => UArray i Word64 -> Int -> Word64’
+          to type ‘forall i. Ix i => UArray i N -> Int -> N’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (IArray UArray N)
+
+RolesIArray.hs:10:13:
+    Could not coerce from ‘UArray i Word64’ to ‘UArray i N’
+      because the second type argument of ‘UArray’ has role Nominal,
+      but the arguments ‘Word64’ and ‘N’ differ
+      arising from the coercion of the method ‘Data.Array.Base.unsafeArray’
+        from type ‘forall i.
+                   Ix i =>
+                   (i, i) -> [(Int, Word64)] -> UArray i Word64’
+          to type ‘forall i. Ix i => (i, i) -> [(Int, N)] -> UArray i N’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (IArray UArray N)
+
+RolesIArray.hs:10:13:
+    Could not coerce from ‘UArray i Word64’ to ‘UArray i N’
+      because the second type argument of ‘UArray’ has role Nominal,
+      but the arguments ‘Word64’ and ‘N’ differ
+      arising from the coercion of the method ‘Data.Array.Base.numElements’
+        from type ‘forall i. Ix i => UArray i Word64 -> Int’
+          to type ‘forall i. Ix i => UArray i N -> Int’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (IArray UArray N)
+
+RolesIArray.hs:10:13:
+    Could not coerce from ‘UArray i Word64’ to ‘UArray i N’
+      because the second type argument of ‘UArray’ has role Nominal,
+      but the arguments ‘Word64’ and ‘N’ differ
+      arising from the coercion of the method ‘bounds’
+        from type ‘forall i. Ix i => UArray i Word64 -> (i, i)’
+          to type ‘forall i. Ix i => UArray i N -> (i, i)’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (IArray UArray N)
diff --git a/testsuite/tests/roles/should_fail/all.T b/testsuite/tests/roles/should_fail/all.T
index 1c69b7c..94674da 100644
--- a/testsuite/tests/roles/should_fail/all.T
+++ b/testsuite/tests/roles/should_fail/all.T
@@ -10,3 +10,4 @@ test('Roles12',
 test('T8773', normal, compile_fail, [''])
 test('T9204', extra_clean(['T9204.o-boot', 'T9204.hi-boot']),
               run_command, ['$MAKE --no-print-directory -s T9204'])
+test('RolesIArray', normal, compile_fail, [''])



More information about the ghc-commits mailing list