summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2016-08-24 22:11:07 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2016-10-08 00:20:34 -0700
commit082991a89174f814ab12535a0ffbc06183d917e1 (patch)
treeaff6b4d01b389e9728cc72d74ecd7e47a93169d5 /testsuite/tests
parent76aaa6eed264ac2398753a09418c6e1374244ff6 (diff)
downloadhaskell-082991a89174f814ab12535a0ffbc06183d917e1.tar.gz
Tc267, tests what happens if you forgot to knot-tie.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/typecheck/should_compile/Makefile8
-rw-r--r--testsuite/tests/typecheck/should_compile/Tc267a.hs6
-rw-r--r--testsuite/tests/typecheck/should_compile/Tc267a.hs-boot4
-rw-r--r--testsuite/tests/typecheck/should_compile/Tc267b.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/Tc267b.hs-boot3
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T4
6 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/Makefile b/testsuite/tests/typecheck/should_compile/Makefile
index 8f3bc618f2..7af8ae146d 100644
--- a/testsuite/tests/typecheck/should_compile/Makefile
+++ b/testsuite/tests/typecheck/should_compile/Makefile
@@ -42,3 +42,11 @@ tc266:
'$(TEST_HC)' $(TEST_HC_OPTS) -c Tc266.hs-boot
'$(TEST_HC)' $(TEST_HC_OPTS) -c Tc266a.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c Tc266.hs
+
+Tc267:
+ $(RM) -f Tc267a.hi-boot Tc267a.o-boot Tc267b.hi-boot Tc267b.o-boot
+ $(RM) -f Tc267a.hi Tc267a.o Tc267b.hi Tc267b.o
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c Tc267a.hs-boot
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c Tc267b.hs-boot
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c Tc267a.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c Tc267b.hs
diff --git a/testsuite/tests/typecheck/should_compile/Tc267a.hs b/testsuite/tests/typecheck/should_compile/Tc267a.hs
new file mode 100644
index 0000000000..cf746455bf
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/Tc267a.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+module Tc267a where
+import {-# SOURCE #-} Tc267b
+data T = T deriving (Show)
+data S = S
+x = y
diff --git a/testsuite/tests/typecheck/should_compile/Tc267a.hs-boot b/testsuite/tests/typecheck/should_compile/Tc267a.hs-boot
new file mode 100644
index 0000000000..66dab26bca
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/Tc267a.hs-boot
@@ -0,0 +1,4 @@
+module Tc267a where
+data T
+data S
+instance Show T
diff --git a/testsuite/tests/typecheck/should_compile/Tc267b.hs b/testsuite/tests/typecheck/should_compile/Tc267b.hs
new file mode 100644
index 0000000000..56abf6da94
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/Tc267b.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+module Tc267b where
+import Tc267a
+y = S
diff --git a/testsuite/tests/typecheck/should_compile/Tc267b.hs-boot b/testsuite/tests/typecheck/should_compile/Tc267b.hs-boot
new file mode 100644
index 0000000000..cc6fa2795c
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/Tc267b.hs-boot
@@ -0,0 +1,3 @@
+module Tc267b where
+import {-# SOURCE #-} Tc267a
+y :: S
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 28d7369cae..3ffdcf745f 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -363,6 +363,10 @@ test('tc266',
[extra_clean(['Tc266.hi-boot', 'Tc266.o-boot', 'Tc266a.hi', 'Tc266a.o', 'Tc266.hi', 'Tc266.o']), run_timeout_multiplier(0.01)] ,
run_command,
['$MAKE -s --no-print-directory tc266'])
+test('Tc267',
+ extra_clean(['Tc267a.hi-boot', 'Tc267a.o-boot', 'Tc267b.hi-boot', 'Tc267b.o-boot', 'Tc267a.hi', 'Tc267a.o', 'Tc267b.hi', 'Tc267b.o']),
+ run_command,
+ ['$MAKE -s --no-print-directory Tc267'])
test('GivenOverlapping', normal, compile, [''])
test('GivenTypeSynonym', normal, compile, [''])