[commit: ghc] master: Tc267, tests what happens if you forgot to knot-tie. (082991a)

git at git.haskell.org git at git.haskell.org
Sat Oct 8 08:38:25 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/082991a89174f814ab12535a0ffbc06183d917e1/ghc

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

commit 082991a89174f814ab12535a0ffbc06183d917e1
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Wed Aug 24 22:11:07 2016 -0700

    Tc267, tests what happens if you forgot to knot-tie.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


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

082991a89174f814ab12535a0ffbc06183d917e1
 testsuite/driver/extra_files.py                         | 1 +
 testsuite/tests/typecheck/should_compile/Makefile       | 8 ++++++++
 testsuite/tests/typecheck/should_compile/Tc267a.hs      | 6 ++++++
 testsuite/tests/typecheck/should_compile/Tc267a.hs-boot | 4 ++++
 testsuite/tests/typecheck/should_compile/Tc267b.hs      | 4 ++++
 testsuite/tests/typecheck/should_compile/Tc267b.hs-boot | 3 +++
 testsuite/tests/typecheck/should_compile/all.T          | 4 ++++
 7 files changed, 30 insertions(+)

diff --git a/testsuite/driver/extra_files.py b/testsuite/driver/extra_files.py
index 3f1e75b..b507826 100644
--- a/testsuite/driver/extra_files.py
+++ b/testsuite/driver/extra_files.py
@@ -540,6 +540,7 @@ extra_src_files = {
   'tc251': ['Tc251_Help.hs'],
   'tc263': ['Tc263_Help.hs'],
   'tc266': ['Tc266.hs', 'Tc266a.hs', 'Tc266.hs-boot'],
+  'Tc267': ['Tc267a.hs', 'Tc267b.hs', 'Tc267a.hs-boot', 'Tc267b.hs-boot'],
   'tcfail186': ['Tcfail186_Help.hs'],
   'tcrun025': ['TcRun025_B.hs'],
   'tcrun038': ['TcRun038_B.hs'],
diff --git a/testsuite/tests/typecheck/should_compile/Makefile b/testsuite/tests/typecheck/should_compile/Makefile
index 8f3bc61..7af8ae1 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 0000000..cf74645
--- /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 0000000..66dab26
--- /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 0000000..56abf6d
--- /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 0000000..cc6fa27
--- /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 28d7369..3ffdcf7 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, [''])



More information about the ghc-commits mailing list