diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-05-10 18:59:52 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-05-10 19:28:09 +0100 |
commit | ebd5165970232def6611608a4a958efe595c40fb (patch) | |
tree | 2276da8cb38cef5fc55e739b51c2611a388609bd | |
parent | 985a2212f72becb76c8fe6c500dcf4b68c9b81c6 (diff) | |
download | haskell-ebd5165970232def6611608a4a958efe595c40fb.tar.gz |
Add a test for #7373
-rw-r--r-- | testsuite/tests/driver/T7373/D.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/Makefile | 16 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/all.T | 8 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/pkg/A.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/pkg/B.hs | 12 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/pkg/B.hs-boot | 6 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/pkg/C.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/pkg/Setup.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/driver/T7373/pkg/pkg.cabal | 6 |
9 files changed, 72 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T7373/D.hs b/testsuite/tests/driver/T7373/D.hs new file mode 100644 index 0000000000..4c0cd61874 --- /dev/null +++ b/testsuite/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/testsuite/tests/driver/T7373/Makefile b/testsuite/tests/driver/T7373/Makefile new file mode 100644 index 0000000000..d7017871bd --- /dev/null +++ b/testsuite/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/testsuite/tests/driver/T7373/all.T b/testsuite/tests/driver/T7373/all.T new file mode 100644 index 0000000000..c4d83db72e --- /dev/null +++ b/testsuite/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/testsuite/tests/driver/T7373/pkg/A.hs b/testsuite/tests/driver/T7373/pkg/A.hs new file mode 100644 index 0000000000..3fcdc4e9ec --- /dev/null +++ b/testsuite/tests/driver/T7373/pkg/A.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE NoImplicitPrelude #-} +module A where + +data Fingerprint = Fingerprint diff --git a/testsuite/tests/driver/T7373/pkg/B.hs b/testsuite/tests/driver/T7373/pkg/B.hs new file mode 100644 index 0000000000..4a5d3970c3 --- /dev/null +++ b/testsuite/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/testsuite/tests/driver/T7373/pkg/B.hs-boot b/testsuite/tests/driver/T7373/pkg/B.hs-boot new file mode 100644 index 0000000000..f302f87bf9 --- /dev/null +++ b/testsuite/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/testsuite/tests/driver/T7373/pkg/C.hs b/testsuite/tests/driver/T7373/pkg/C.hs new file mode 100644 index 0000000000..22b240cf8a --- /dev/null +++ b/testsuite/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/testsuite/tests/driver/T7373/pkg/Setup.hs b/testsuite/tests/driver/T7373/pkg/Setup.hs new file mode 100644 index 0000000000..9a994af677 --- /dev/null +++ b/testsuite/tests/driver/T7373/pkg/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/testsuite/tests/driver/T7373/pkg/pkg.cabal b/testsuite/tests/driver/T7373/pkg/pkg.cabal new file mode 100644 index 0000000000..cd9b81bf50 --- /dev/null +++ b/testsuite/tests/driver/T7373/pkg/pkg.cabal @@ -0,0 +1,6 @@ +name: pkg +version: 0 + +Library + Exposed-Modules: A B C + |