[commit: ghc] wip/rae: Test #9204 in roles/should_fail/T9204 (ec8781f)

git at git.haskell.org git at git.haskell.org
Wed Nov 12 18:28:23 UTC 2014


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

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

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

commit ec8781f063d246a79ce1d4eb207dbee4b6317c94
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Tue Nov 4 17:40:06 2014 -0500

    Test #9204 in roles/should_fail/T9204


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

ec8781f063d246a79ce1d4eb207dbee4b6317c94
 testsuite/tests/roles/should_fail/Makefile      | 4 ++++
 testsuite/tests/roles/should_fail/T9204.hs      | 6 ++++++
 testsuite/tests/roles/should_fail/T9204.hs-boot | 4 ++++
 testsuite/tests/roles/should_fail/T9204.stderr  | 8 ++++++++
 testsuite/tests/roles/should_fail/all.T         | 2 ++
 5 files changed, 24 insertions(+)

diff --git a/testsuite/tests/roles/should_fail/Makefile b/testsuite/tests/roles/should_fail/Makefile
index 8f80de3..14d6720 100644
--- a/testsuite/tests/roles/should_fail/Makefile
+++ b/testsuite/tests/roles/should_fail/Makefile
@@ -7,3 +7,7 @@ include $(TOP)/mk/test.mk
 Roles12:
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs-boot
 	-'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs
+
+T9204:
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c T9204.hs-boot
+	-'$(TEST_HC)' $(TEST_HC_OPTS) -c T9204.hs
diff --git a/testsuite/tests/roles/should_fail/T9204.hs b/testsuite/tests/roles/should_fail/T9204.hs
new file mode 100644
index 0000000..e2351a2
--- /dev/null
+++ b/testsuite/tests/roles/should_fail/T9204.hs
@@ -0,0 +1,6 @@
+
+module T9204 where
+
+import {-# SOURCE #-} T9204
+
+data D a
diff --git a/testsuite/tests/roles/should_fail/T9204.hs-boot b/testsuite/tests/roles/should_fail/T9204.hs-boot
new file mode 100644
index 0000000..7ee0f1d
--- /dev/null
+++ b/testsuite/tests/roles/should_fail/T9204.hs-boot
@@ -0,0 +1,4 @@
+
+module T9204 where
+
+data D a
diff --git a/testsuite/tests/roles/should_fail/T9204.stderr b/testsuite/tests/roles/should_fail/T9204.stderr
new file mode 100644
index 0000000..9936839
--- /dev/null
+++ b/testsuite/tests/roles/should_fail/T9204.stderr
@@ -0,0 +1,8 @@
+
+T9204.hs:6:1:
+    Type constructor ‘D’ has conflicting definitions in the module
+    and its hs-boot file
+    Main module: type role D phantom
+                 data D a
+    Boot file:   abstract D a
+    The roles do not match. Roles default to ‘representational’ in boot files
diff --git a/testsuite/tests/roles/should_fail/all.T b/testsuite/tests/roles/should_fail/all.T
index d0d5c4d..bb90fee 100644
--- a/testsuite/tests/roles/should_fail/all.T
+++ b/testsuite/tests/roles/should_fail/all.T
@@ -8,3 +8,5 @@ test('Roles12',
      extra_clean(['Roles12.o-boot', 'Roles12.hi-boot']),
      run_command, ['$MAKE --no-print-directory -s Roles12'])
 test('T8773', normal, compile_fail, [''])
+test('T9204', [ expect_broken(9204), extra_clean(['T9204.o-boot', 'T9204.hi-boot']) ],
+              run_command, ['$MAKE --no-print-directory -s T9204'])



More information about the ghc-commits mailing list