diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-10-17 14:06:18 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-10-17 23:41:25 -0700 |
commit | 8fa2cdb16c4db8141b889f2364d8e5fccc62cde3 (patch) | |
tree | 9c23367c8239311feaf835d331b8790f3ef742af /testsuite/tests/driver | |
parent | cf5eec3eaa638719fd9768c20271f8aa2b2eac1f (diff) | |
download | haskell-8fa2cdb16c4db8141b889f2364d8e5fccc62cde3.tar.gz |
Track dep_finsts in exports hash, as it affects downstream deps.
Summary:
I also added some more comments about the orphan and family instance
hashing business.
Fixes #12723.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2607
GHC Trac Issues: #12723
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r-- | testsuite/tests/driver/recomp016/A.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp016/A2.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp016/C.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp016/D.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp016/E.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp016/Makefile | 19 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp016/all.T | 7 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp016/recomp016.stdout | 12 |
8 files changed, 53 insertions, 0 deletions
diff --git a/testsuite/tests/driver/recomp016/A.hs b/testsuite/tests/driver/recomp016/A.hs new file mode 100644 index 0000000000..17a9dc0cf5 --- /dev/null +++ b/testsuite/tests/driver/recomp016/A.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-} +module A where +type family F a +type instance F Int = Bool diff --git a/testsuite/tests/driver/recomp016/A2.hs b/testsuite/tests/driver/recomp016/A2.hs new file mode 100644 index 0000000000..bb0409ee1e --- /dev/null +++ b/testsuite/tests/driver/recomp016/A2.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-} +module A2 where +type family F a +type instance F Int = Bool diff --git a/testsuite/tests/driver/recomp016/C.hs b/testsuite/tests/driver/recomp016/C.hs new file mode 100644 index 0000000000..dc3b65802f --- /dev/null +++ b/testsuite/tests/driver/recomp016/C.hs @@ -0,0 +1,2 @@ +module C where +import B diff --git a/testsuite/tests/driver/recomp016/D.hs b/testsuite/tests/driver/recomp016/D.hs new file mode 100644 index 0000000000..604f04522c --- /dev/null +++ b/testsuite/tests/driver/recomp016/D.hs @@ -0,0 +1,2 @@ +module D where +import C diff --git a/testsuite/tests/driver/recomp016/E.hs b/testsuite/tests/driver/recomp016/E.hs new file mode 100644 index 0000000000..5adb6a831d --- /dev/null +++ b/testsuite/tests/driver/recomp016/E.hs @@ -0,0 +1,3 @@ +module E where +import D +import B diff --git a/testsuite/tests/driver/recomp016/Makefile b/testsuite/tests/driver/recomp016/Makefile new file mode 100644 index 0000000000..821b126c45 --- /dev/null +++ b/testsuite/tests/driver/recomp016/Makefile @@ -0,0 +1,19 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +# Recompilation tests + +clean: + rm -f *.o *.hi + +# bug #12723 + +recomp016: clean + echo 'module B (module A) where import A' > B.hs + echo 'first run' + '$(TEST_HC)' $(TEST_HC_OPTS) --make E.hs + sleep 1 + echo 'module B (module A2) where import A2' > B.hs + echo 'second run' + '$(TEST_HC)' $(TEST_HC_OPTS) --make E.hs diff --git a/testsuite/tests/driver/recomp016/all.T b/testsuite/tests/driver/recomp016/all.T new file mode 100644 index 0000000000..a1a2ebd55a --- /dev/null +++ b/testsuite/tests/driver/recomp016/all.T @@ -0,0 +1,7 @@ +# Test for #12723, a recompilation bug + +test('recomp016', + [ clean_cmd('$MAKE -s clean') ], + run_command, + ['$MAKE -s --no-print-directory recomp016']) + diff --git a/testsuite/tests/driver/recomp016/recomp016.stdout b/testsuite/tests/driver/recomp016/recomp016.stdout new file mode 100644 index 0000000000..eb6c6fce42 --- /dev/null +++ b/testsuite/tests/driver/recomp016/recomp016.stdout @@ -0,0 +1,12 @@ +first run +[1 of 5] Compiling A ( A.hs, A.o ) +[2 of 5] Compiling B ( B.hs, B.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 ) +second run +[1 of 5] Compiling A2 ( A2.hs, A2.o ) +[2 of 5] Compiling B ( B.hs, B.o ) +[3 of 5] Compiling C ( C.hs, C.o ) [B changed] +[4 of 5] Compiling D ( D.hs, D.o ) [C changed] +[5 of 5] Compiling E ( E.hs, E.o ) [B changed] |