diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/driver/recomp005 | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/driver/recomp005')
-rw-r--r-- | testsuite/tests/driver/recomp005/A.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/B.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/C1.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/C2.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/D.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/E.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/Makefile | 16 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/all.T | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/recomp005.stderr | 0 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp005/recomp005.stdout | 8 |
10 files changed, 60 insertions, 0 deletions
diff --git a/testsuite/tests/driver/recomp005/A.hs b/testsuite/tests/driver/recomp005/A.hs new file mode 100644 index 0000000000..4cf81d9c9f --- /dev/null +++ b/testsuite/tests/driver/recomp005/A.hs @@ -0,0 +1,4 @@ +module A where + +f :: Int -> Int +f x = x + 1 diff --git a/testsuite/tests/driver/recomp005/B.hs b/testsuite/tests/driver/recomp005/B.hs new file mode 100644 index 0000000000..84ef616bba --- /dev/null +++ b/testsuite/tests/driver/recomp005/B.hs @@ -0,0 +1,5 @@ +module B where + +g :: Int -> Int +g x = x * 2 + diff --git a/testsuite/tests/driver/recomp005/C1.hs b/testsuite/tests/driver/recomp005/C1.hs new file mode 100644 index 0000000000..8141245535 --- /dev/null +++ b/testsuite/tests/driver/recomp005/C1.hs @@ -0,0 +1,5 @@ + +module C (f, g) where + +import A +import B diff --git a/testsuite/tests/driver/recomp005/C2.hs b/testsuite/tests/driver/recomp005/C2.hs new file mode 100644 index 0000000000..7764ed861b --- /dev/null +++ b/testsuite/tests/driver/recomp005/C2.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE RankNTypes #-} +module C (f, g) where + +import A +import B + +{-# RULES "f/g" forall x . f (g x) = x #-} diff --git a/testsuite/tests/driver/recomp005/D.hs b/testsuite/tests/driver/recomp005/D.hs new file mode 100644 index 0000000000..c8cd790be1 --- /dev/null +++ b/testsuite/tests/driver/recomp005/D.hs @@ -0,0 +1,3 @@ +module D () where + +import C () -- so we don't get a dependency on C's export list diff --git a/testsuite/tests/driver/recomp005/E.hs b/testsuite/tests/driver/recomp005/E.hs new file mode 100644 index 0000000000..e6e2e6b784 --- /dev/null +++ b/testsuite/tests/driver/recomp005/E.hs @@ -0,0 +1,7 @@ +module E where + +import D -- get the RULE from C via D +import A +import B + +z = f (g 3) diff --git a/testsuite/tests/driver/recomp005/Makefile b/testsuite/tests/driver/recomp005/Makefile new file mode 100644 index 0000000000..e1bda204b7 --- /dev/null +++ b/testsuite/tests/driver/recomp005/Makefile @@ -0,0 +1,16 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +clean: + rm -f *.o* + rm -f *.hi* + rm -f C.hs + +recomp005: clean + cp C1.hs C.hs + '$(TEST_HC)' $(TEST_HC_OPTS) --make E.hs -O + sleep 1 + cp C2.hs C.hs + # Should recompile E, because C is now an orphan + '$(TEST_HC)' $(TEST_HC_OPTS) --make E.hs -O diff --git a/testsuite/tests/driver/recomp005/all.T b/testsuite/tests/driver/recomp005/all.T new file mode 100644 index 0000000000..d5d89b1712 --- /dev/null +++ b/testsuite/tests/driver/recomp005/all.T @@ -0,0 +1,5 @@ +test('recomp005', + [skip_if_fast, + clean_cmd('$MAKE -s clean')], + run_command, ['$MAKE -s --no-print-directory recomp005']) + diff --git a/testsuite/tests/driver/recomp005/recomp005.stderr b/testsuite/tests/driver/recomp005/recomp005.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/driver/recomp005/recomp005.stderr diff --git a/testsuite/tests/driver/recomp005/recomp005.stdout b/testsuite/tests/driver/recomp005/recomp005.stdout new file mode 100644 index 0000000000..720a1ea74f --- /dev/null +++ b/testsuite/tests/driver/recomp005/recomp005.stdout @@ -0,0 +1,8 @@ +[1 of 5] Compiling B ( B.hs, B.o ) +[2 of 5] Compiling A ( A.hs, A.o ) +[3 of 5] Compiling C ( C.hs, C.o ) +[4 of 5] Compiling D ( D.hs, D.o ) +[5 of 5] Compiling E ( E.hs, E.o ) +[3 of 5] Compiling C ( C.hs, C.o ) +[4 of 5] Compiling D ( D.hs, D.o ) +[5 of 5] Compiling E ( E.hs, E.o ) |