[commit: ghc] ghc-8.2: testsuite: Add test for #14128 (9097961)

git at git.haskell.org git at git.haskell.org
Tue Sep 19 21:10:26 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/90979616dd03b1be6e2c4fd2020140c15e034eb0/ghc

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

commit 90979616dd03b1be6e2c4fd2020140c15e034eb0
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Sat Aug 26 16:16:47 2017 -0400

    testsuite: Add test for #14128
    
    Reviewers: austin, goldfire
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #14128
    
    Differential Revision: https://phabricator.haskell.org/D3890
    
    (cherry picked from commit 248ad30385acc0f81f1959b6345a7388be76dc85)


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

90979616dd03b1be6e2c4fd2020140c15e034eb0
 testsuite/tests/typecheck/should_compile/T14128.hs       |  7 +++++++
 testsuite/tests/typecheck/should_compile/T14128.hs-boot  |  5 +++++
 testsuite/tests/typecheck/should_compile/T14128Main.hs   | 10 ++++++++++
 testsuite/tests/typecheck/should_compile/T14128Type.hs   |  3 +++
 testsuite/tests/typecheck/should_compile/T14128a.hs      |  1 +
 testsuite/tests/typecheck/should_compile/T14128a.hs-boot |  3 +++
 testsuite/tests/typecheck/should_compile/all.T           |  1 +
 7 files changed, 30 insertions(+)

diff --git a/testsuite/tests/typecheck/should_compile/T14128.hs b/testsuite/tests/typecheck/should_compile/T14128.hs
new file mode 100644
index 0000000..a1159c6
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14128.hs
@@ -0,0 +1,7 @@
+module T14128 where
+
+import T14128Type
+import {-# SOURCE #-} T14128a
+
+instance Show AType where
+    show AType = "hello"
diff --git a/testsuite/tests/typecheck/should_compile/T14128.hs-boot b/testsuite/tests/typecheck/should_compile/T14128.hs-boot
new file mode 100644
index 0000000..27ef36a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14128.hs-boot
@@ -0,0 +1,5 @@
+module T14128 where
+
+import T14128Type
+
+instance Show AType
diff --git a/testsuite/tests/typecheck/should_compile/T14128Main.hs b/testsuite/tests/typecheck/should_compile/T14128Main.hs
new file mode 100644
index 0000000..9407606
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14128Main.hs
@@ -0,0 +1,10 @@
+module T14128Main where
+
+import T14128
+
+-- Overview:
+--   * T14128Main is imports T14128
+--   * T14128Type defines datatype MyType
+--   * T14128 has a boot file and defines a orphan Show instance; it SOURCE
+--     imports T14128
+--   * T14128a has a boot file which SOURCE imports T14128
diff --git a/testsuite/tests/typecheck/should_compile/T14128Type.hs b/testsuite/tests/typecheck/should_compile/T14128Type.hs
new file mode 100644
index 0000000..f64ec48
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14128Type.hs
@@ -0,0 +1,3 @@
+module T14128Type where
+
+data AType = AType
diff --git a/testsuite/tests/typecheck/should_compile/T14128a.hs b/testsuite/tests/typecheck/should_compile/T14128a.hs
new file mode 100644
index 0000000..a93b2fe
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14128a.hs
@@ -0,0 +1 @@
+module T14128a where
diff --git a/testsuite/tests/typecheck/should_compile/T14128a.hs-boot b/testsuite/tests/typecheck/should_compile/T14128a.hs-boot
new file mode 100644
index 0000000..e38681a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14128a.hs-boot
@@ -0,0 +1,3 @@
+module T14128a where
+
+import {-# SOURCE #-} T14128
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 044f2eb..6671291 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -561,4 +561,5 @@ test('T13881', normal, compile, [''])
 test('T13915a', normal, multimod_compile, ['T13915a', '-v0'])
 test('T13915b', normal, compile, [''])
 test('T13984', normal, compile, [''])
+test('T14128', normal, multimod_compile, ['T14128Main', '-v0'])
 test('T14154', normal, compile, [''])



More information about the ghc-commits mailing list