diff options
Diffstat (limited to 'testsuite/tests/programs/hs-boot')
-rw-r--r-- | testsuite/tests/programs/hs-boot/A.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/programs/hs-boot/A.hs-boot | 4 | ||||
-rw-r--r-- | testsuite/tests/programs/hs-boot/B.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/programs/hs-boot/C.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/programs/hs-boot/Main.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/programs/hs-boot/Makefile | 3 | ||||
-rw-r--r-- | testsuite/tests/programs/hs-boot/all.T | 9 | ||||
-rw-r--r-- | testsuite/tests/programs/hs-boot/hs-boot.stderr | 2 |
8 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/tests/programs/hs-boot/A.hs b/testsuite/tests/programs/hs-boot/A.hs new file mode 100644 index 0000000000..e09cebb67b --- /dev/null +++ b/testsuite/tests/programs/hs-boot/A.hs @@ -0,0 +1,6 @@ + +module A where + +import C +-- THIS FIXES IT: +-- import B diff --git a/testsuite/tests/programs/hs-boot/A.hs-boot b/testsuite/tests/programs/hs-boot/A.hs-boot new file mode 100644 index 0000000000..c80b00d29d --- /dev/null +++ b/testsuite/tests/programs/hs-boot/A.hs-boot @@ -0,0 +1,4 @@ + +module A where + +import C diff --git a/testsuite/tests/programs/hs-boot/B.hs b/testsuite/tests/programs/hs-boot/B.hs new file mode 100644 index 0000000000..13d1ac4948 --- /dev/null +++ b/testsuite/tests/programs/hs-boot/B.hs @@ -0,0 +1,5 @@ + +module B where + +import C +import {-# SOURCE #-} A diff --git a/testsuite/tests/programs/hs-boot/C.hs b/testsuite/tests/programs/hs-boot/C.hs new file mode 100644 index 0000000000..b81773302e --- /dev/null +++ b/testsuite/tests/programs/hs-boot/C.hs @@ -0,0 +1,2 @@ + +module C where diff --git a/testsuite/tests/programs/hs-boot/Main.hs b/testsuite/tests/programs/hs-boot/Main.hs new file mode 100644 index 0000000000..2f51014fd2 --- /dev/null +++ b/testsuite/tests/programs/hs-boot/Main.hs @@ -0,0 +1,8 @@ + +module Main where + +import B +-- REMOVING THIS OR MOVING THIS OVER "import B" FIXES IT: +import C + +main = return ()
\ No newline at end of file diff --git a/testsuite/tests/programs/hs-boot/Makefile b/testsuite/tests/programs/hs-boot/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/programs/hs-boot/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/programs/hs-boot/all.T b/testsuite/tests/programs/hs-boot/all.T new file mode 100644 index 0000000000..eb48087188 --- /dev/null +++ b/testsuite/tests/programs/hs-boot/all.T @@ -0,0 +1,9 @@ +# This test is for bug #906, a problem with the ordering of +# compilations involving .hs-boot files, fixed in 6.6. + +test('hs-boot', + extra_clean(['A.hi', 'A.hi-boot', 'A.o', 'A.o-boot', + 'B.hi', 'B.o', 'C.hi', 'C.o', + 'Main.hi', 'Main.o']), + multimod_compile, + ['Main -v0', '']) diff --git a/testsuite/tests/programs/hs-boot/hs-boot.stderr b/testsuite/tests/programs/hs-boot/hs-boot.stderr new file mode 100644 index 0000000000..99de1b67f5 --- /dev/null +++ b/testsuite/tests/programs/hs-boot/hs-boot.stderr @@ -0,0 +1,2 @@ + +B.hs:5:23: Warning: {-# SOURCE #-} unnecessary in import of `A' |