[commit: testsuite] master: Add a test for #7373 (b0123eb)

Ian Lynagh igloo at earth.li
Fri May 10 20:34:06 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

https://github.com/ghc/testsuite/commit/b0123ebf7cdc6f6455e2a1fe1a8db82fe2f1f512

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

commit b0123ebf7cdc6f6455e2a1fe1a8db82fe2f1f512
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri May 10 18:59:52 2013 +0100

    Add a test for #7373

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

 tests/driver/T7373/D.hs                      |    9 +++++++++
 tests/driver/T7373/Makefile                  |   16 ++++++++++++++++
 tests/driver/T7373/all.T                     |    8 ++++++++
 tests/driver/T7373/pkg/A.hs                  |    4 ++++
 tests/driver/T7373/pkg/B.hs                  |   12 ++++++++++++
 tests/driver/T7373/pkg/B.hs-boot             |    6 ++++++
 tests/driver/T7373/pkg/C.hs                  |    9 +++++++++
 tests/driver/{T3007/A => T7373/pkg}/Setup.hs |    0 
 tests/driver/T7373/pkg/pkg.cabal             |    6 ++++++
 9 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/tests/driver/T7373/D.hs b/tests/driver/T7373/D.hs
new file mode 100644
index 0000000..4c0cd61
--- /dev/null
+++ b/tests/driver/T7373/D.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+module D where
+
+import A
+import C
+
+typeRepX :: Fingerprint
+typeRepX = mkTyConApp Fingerprint
+
diff --git a/tests/driver/T7373/Makefile b/tests/driver/T7373/Makefile
new file mode 100644
index 0000000..d701787
--- /dev/null
+++ b/tests/driver/T7373/Makefile
@@ -0,0 +1,16 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+.PHONY: T7373
+T7373:
+	echo '[]' > package.conf
+	cd pkg && '$(TEST_HC)' -v0 --make Setup
+	cd pkg && ./Setup configure -v0 --with-compiler='$(TEST_HC)' --ghc-pkg-options="--global-package-db ../package.conf" --ghc-options="-package-db ../package.conf"
+	cd pkg && ./Setup build -v0
+	cd pkg && ./Setup register --inplace -v0
+	# Pretend that B.hs hasn't been compiled yet, by removing the results
+	rm pkg/dist/build/B.hi
+	rm pkg/dist/build/B.o
+	'$(TEST_HC)' $(TEST_HC_OPTS) -package-db package.conf -c D.hs -O
+
diff --git a/tests/driver/T7373/all.T b/tests/driver/T7373/all.T
new file mode 100644
index 0000000..c4d83db
--- /dev/null
+++ b/tests/driver/T7373/all.T
@@ -0,0 +1,8 @@
+test('T7373',
+     [extra_clean(['pkg/Setup', 'pkg/Setup.exe', 'pkg/Setup.o', 'pkg/Setup.hi',
+                   'D.o', 'D.hi', 'package.conf']),
+      clean_cmd('rm -rf pkg/dist/'),
+      expect_broken(7373)],
+     run_command,
+     ['$MAKE -s --no-print-directory T7373'])
+
diff --git a/tests/driver/T7373/pkg/A.hs b/tests/driver/T7373/pkg/A.hs
new file mode 100644
index 0000000..3fcdc4e
--- /dev/null
+++ b/tests/driver/T7373/pkg/A.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+module A where
+
+data Fingerprint = Fingerprint
diff --git a/tests/driver/T7373/pkg/B.hs b/tests/driver/T7373/pkg/B.hs
new file mode 100644
index 0000000..4a5d397
--- /dev/null
+++ b/tests/driver/T7373/pkg/B.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+module B (fingerprintFingerprints) where
+
+import A
+import C
+
+fingerprintFingerprints :: [Fingerprint] -> Fingerprint
+fingerprintFingerprints = undefined mkTyConApp
+
+undefined :: a
+undefined = undefined
+
diff --git a/tests/driver/T7373/pkg/B.hs-boot b/tests/driver/T7373/pkg/B.hs-boot
new file mode 100644
index 0000000..f302f87
--- /dev/null
+++ b/tests/driver/T7373/pkg/B.hs-boot
@@ -0,0 +1,6 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+module B (fingerprintFingerprints) where
+
+import A
+
+fingerprintFingerprints :: [Fingerprint] -> Fingerprint
diff --git a/tests/driver/T7373/pkg/C.hs b/tests/driver/T7373/pkg/C.hs
new file mode 100644
index 0000000..22b240c
--- /dev/null
+++ b/tests/driver/T7373/pkg/C.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+
+module C where
+
+import A
+import {-# SOURCE #-} B
+
+mkTyConApp :: Fingerprint -> Fingerprint
+mkTyConApp f = fingerprintFingerprints [f]
diff --git a/tests/driver/T3007/A/Setup.hs b/tests/driver/T7373/pkg/Setup.hs
similarity index 100%
copy from tests/driver/T3007/A/Setup.hs
copy to tests/driver/T7373/pkg/Setup.hs
diff --git a/tests/driver/T7373/pkg/pkg.cabal b/tests/driver/T7373/pkg/pkg.cabal
new file mode 100644
index 0000000..cd9b81b
--- /dev/null
+++ b/tests/driver/T7373/pkg/pkg.cabal
@@ -0,0 +1,6 @@
+name: pkg
+version: 0
+
+Library
+    Exposed-Modules: A B C
+





More information about the ghc-commits mailing list