[commit: ghc] master: Add test cases for #13821 (271e0f0)

git at git.haskell.org git at git.haskell.org
Mon Jun 19 12:16:27 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/271e0f087b6560f445d7e6bd7f6cecec917e1085/ghc

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

commit 271e0f087b6560f445d7e6bd7f6cecec917e1085
Author: Douglas Wilson <douglas.wilson at gmail.com>
Date:   Sun Jun 18 16:50:38 2017 -0400

    Add test cases for #13821
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #13821
    
    Differential Revision: https://phabricator.haskell.org/D3642


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

271e0f087b6560f445d7e6bd7f6cecec917e1085
 testsuite/tests/typecheck/should_fail/Makefile        | 4 ++++
 testsuite/tests/typecheck/should_fail/T13821A.hs-boot | 6 ++++++
 testsuite/tests/typecheck/should_fail/T13821B.bkp     | 6 ++++++
 testsuite/tests/typecheck/should_fail/all.T           | 2 ++
 4 files changed, 18 insertions(+)

diff --git a/testsuite/tests/typecheck/should_fail/Makefile b/testsuite/tests/typecheck/should_fail/Makefile
index f994435..2c5e874 100644
--- a/testsuite/tests/typecheck/should_fail/Makefile
+++ b/testsuite/tests/typecheck/should_fail/Makefile
@@ -6,3 +6,7 @@ include $(TOP)/mk/test.mk
 
 foo:
 	echo hello
+
+T13821A:
+	$(RM) -f T13821A.hi-boot T13821A.o-boot
+	!('$(TEST_HC)' $(TEST_HC_OPTS) -c T13821A.hs-boot)
diff --git a/testsuite/tests/typecheck/should_fail/T13821A.hs-boot b/testsuite/tests/typecheck/should_fail/T13821A.hs-boot
new file mode 100644
index 0000000..4fda6bc
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T13821A.hs-boot
@@ -0,0 +1,6 @@
+{-# LANGUAGE MagicHash #-}
+module T13821A where
+
+import GHC.Prim
+
+x :: Int#
diff --git a/testsuite/tests/typecheck/should_fail/T13821B.bkp b/testsuite/tests/typecheck/should_fail/T13821B.bkp
new file mode 100644
index 0000000..8d5e066
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T13821B.bkp
@@ -0,0 +1,6 @@
+{-# LANGUAGE MagicHash #-}
+unit T13821B where
+  signature A where
+    import GHC.Prim
+
+    x :: Int#
\ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index bf4854f..5cc8171 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -442,3 +442,5 @@ test('T13611', expect_broken(13611), compile_fail, [''])
 test('T13320', normal, compile_fail, [''])
 test('T13640', normal, compile_fail, [''])
 test('T13677', normal, compile_fail, [''])
+test('T13821A', expect_broken(13821), run_command, ['$MAKE -s --no-print-directory T13821A'])
+test('T13821B', expect_broken(13821), backpack_typecheck_fail, [''])



More information about the ghc-commits mailing list