diff options
| author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-08-22 08:44:25 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-22 11:09:05 -0400 |
| commit | 4717ce8658f12f425aebd1fc7f7ad8fe04a81df5 (patch) | |
| tree | 9522a650e1555b849a3a88e114f1255d02dafc00 /testsuite | |
| parent | afc2f7989ea973f201a28d95abb24b22269c5256 (diff) | |
| download | haskell-4717ce8658f12f425aebd1fc7f7ad8fe04a81df5.tar.gz | |
Fix incorrect retypecheck loop in -j (#14075)
The parallel codepath was incorrectly retypechecking the
hs-boot ModIface prior to typechecking the hs file,
which was inconsistent with the non-parallel case. The
non-parallel case gets it right: you don't want to retypecheck
the hs-boot file itself (forwarding its declarations to hs)
because you need it to be consistently knot-tied with itself
when you compare the interfaces.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, simonpj, austin
Reviewed By: bgamari
Subscribers: duog, rwbarton, thomie
GHC Trac Issues: #14075
Differential Revision: https://phabricator.haskell.org/D3815
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/tests/driver/T14075/F.hs | 1 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/F.hs-boot | 6 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/Makefile | 6 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/O.hs | 3 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/T14075.stderr | 7 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/T14075.stdout | 3 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/V.hs | 3 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/V.hs-boot | 1 | ||||
| -rw-r--r-- | testsuite/tests/driver/T14075/all.T | 4 |
9 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T14075/F.hs b/testsuite/tests/driver/T14075/F.hs new file mode 100644 index 0000000000..3e32036eb4 --- /dev/null +++ b/testsuite/tests/driver/T14075/F.hs @@ -0,0 +1 @@ +module F () where diff --git a/testsuite/tests/driver/T14075/F.hs-boot b/testsuite/tests/driver/T14075/F.hs-boot new file mode 100644 index 0000000000..41008d554f --- /dev/null +++ b/testsuite/tests/driver/T14075/F.hs-boot @@ -0,0 +1,6 @@ +module F where + +import O (O) + +newtype F = F () +instance O F where diff --git a/testsuite/tests/driver/T14075/Makefile b/testsuite/tests/driver/T14075/Makefile new file mode 100644 index 0000000000..505274a181 --- /dev/null +++ b/testsuite/tests/driver/T14075/Makefile @@ -0,0 +1,6 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T14075: + ! '$(TEST_HC)' $(TEST_HC_OPTS) -j2 F O V diff --git a/testsuite/tests/driver/T14075/O.hs b/testsuite/tests/driver/T14075/O.hs new file mode 100644 index 0000000000..2cbb8bb0ef --- /dev/null +++ b/testsuite/tests/driver/T14075/O.hs @@ -0,0 +1,3 @@ +module O (O) where + +class O a where diff --git a/testsuite/tests/driver/T14075/T14075.stderr b/testsuite/tests/driver/T14075/T14075.stderr new file mode 100644 index 0000000000..0493a96f12 --- /dev/null +++ b/testsuite/tests/driver/T14075/T14075.stderr @@ -0,0 +1,7 @@ + +F.hs:1:1: error: + instance O.O F.F -- Defined at F.hs-boot:6:10 + is defined in the hs-boot file, but not in the module itself + +F.hs-boot:5:1: error: + ‘F.F’ is exported by the hs-boot file, but not exported by the module diff --git a/testsuite/tests/driver/T14075/T14075.stdout b/testsuite/tests/driver/T14075/T14075.stdout new file mode 100644 index 0000000000..18f17be1ee --- /dev/null +++ b/testsuite/tests/driver/T14075/T14075.stdout @@ -0,0 +1,3 @@ +[1 of 4] Compiling O ( O.hs, O.o ) +[2 of 4] Compiling F[boot] ( F.hs-boot, F.o-boot ) +[3 of 4] Compiling F ( F.hs, F.o ) diff --git a/testsuite/tests/driver/T14075/V.hs b/testsuite/tests/driver/T14075/V.hs new file mode 100644 index 0000000000..cf06b93dcc --- /dev/null +++ b/testsuite/tests/driver/T14075/V.hs @@ -0,0 +1,3 @@ +module V () where + +import {-# SOURCE #-} F () diff --git a/testsuite/tests/driver/T14075/V.hs-boot b/testsuite/tests/driver/T14075/V.hs-boot new file mode 100644 index 0000000000..ec64e228fc --- /dev/null +++ b/testsuite/tests/driver/T14075/V.hs-boot @@ -0,0 +1 @@ +module V where diff --git a/testsuite/tests/driver/T14075/all.T b/testsuite/tests/driver/T14075/all.T new file mode 100644 index 0000000000..646976a5b2 --- /dev/null +++ b/testsuite/tests/driver/T14075/all.T @@ -0,0 +1,4 @@ +test('T14075', + [extra_files(['F.hs', 'F.hs-boot', 'O.hs', 'V.hs', 'V.hs-boot'])], + run_command, + ['$MAKE -s --no-print-directory T14075']) |
