diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-07-28 12:58:53 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-30 22:54:48 -0400 |
commit | 7c274cd530cc42a26028050b75d56b3437e06ec1 (patch) | |
tree | 235ec0129a613d35ec8b73da6e4f787083b90b1c /testsuite/tests/rename | |
parent | 9f71f69714255165d0fdc2790a588487ff9439dc (diff) | |
download | haskell-7c274cd530cc42a26028050b75d56b3437e06ec1.tar.gz |
Fix minimal imports dump for boot files (fix #18497)
Diffstat (limited to 'testsuite/tests/rename')
7 files changed, 46 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/Makefile b/testsuite/tests/rename/should_compile/Makefile index 6e41534ca8..495efed5cc 100644 --- a/testsuite/tests/rename/should_compile/Makefile +++ b/testsuite/tests/rename/should_compile/Makefile @@ -56,3 +56,7 @@ T7969: '$(TEST_HC)' $(TEST_HC_OPTS) -c T7969a.hs '$(TEST_HC)' $(TEST_HC_OPTS) -c T7969.hs -ddump-minimal-imports cat T7969.imports + +T18497: + '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code T18497_Foo.hs T18497_Bar.hs -ddump-minimal-imports + cat T18497_Bar.imports-boot diff --git a/testsuite/tests/rename/should_compile/T18497.stdout b/testsuite/tests/rename/should_compile/T18497.stdout new file mode 100644 index 0000000000..d3118818ac --- /dev/null +++ b/testsuite/tests/rename/should_compile/T18497.stdout @@ -0,0 +1,5 @@ +[1 of 4] Compiling T18497_Foo[boot] ( T18497_Foo.hs-boot, nothing ) +[2 of 4] Compiling T18497_Bar[boot] ( T18497_Bar.hs-boot, nothing ) +[3 of 4] Compiling T18497_Foo ( T18497_Foo.hs, nothing ) +[4 of 4] Compiling T18497_Bar ( T18497_Bar.hs, nothing ) +import {-# SOURCE #-} T18497_Foo ( X ) diff --git a/testsuite/tests/rename/should_compile/T18497_Bar.hs b/testsuite/tests/rename/should_compile/T18497_Bar.hs new file mode 100644 index 0000000000..30675fd1b1 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T18497_Bar.hs @@ -0,0 +1,14 @@ +module T18497_Bar where + +import T18497_Foo + +data Y = SomeY X | NoY + +blah :: Y +blah = NoY + +blip :: Y +blip = SomeY foo + +woop NoX = NoY +woop (SomeX y _) = y diff --git a/testsuite/tests/rename/should_compile/T18497_Bar.hs-boot b/testsuite/tests/rename/should_compile/T18497_Bar.hs-boot new file mode 100644 index 0000000000..0eeb59f436 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T18497_Bar.hs-boot @@ -0,0 +1,9 @@ +module T18497_Bar where + +import {-# SOURCE #-} T18497_Foo + +data Y + +blah :: Y + +woop :: X -> Y diff --git a/testsuite/tests/rename/should_compile/T18497_Foo.hs b/testsuite/tests/rename/should_compile/T18497_Foo.hs new file mode 100644 index 0000000000..09f048fe51 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T18497_Foo.hs @@ -0,0 +1,8 @@ +module T18497_Foo where + +import {-# SOURCE #-} T18497_Bar + +data X = SomeX Y Y | NoX + +foo :: X +foo = SomeX blah (woop NoX) diff --git a/testsuite/tests/rename/should_compile/T18497_Foo.hs-boot b/testsuite/tests/rename/should_compile/T18497_Foo.hs-boot new file mode 100644 index 0000000000..acf3e8245c --- /dev/null +++ b/testsuite/tests/rename/should_compile/T18497_Foo.hs-boot @@ -0,0 +1,5 @@ +module T18497_Foo where + +data X + +foo :: X diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 6bcb9377bd..9a519483d5 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -174,3 +174,4 @@ test('T17244B', normal, compile, ['']) test('T17244C', normal, compile, ['']) test('T17832', [], multimod_compile, ['T17832M1', 'T17832M2']) test('T17837', normal, compile, ['']) +test('T18497', [], makefile_test, ['T18497']) |