diff options
author | sheaf <sam.derbyshire@gmail.com> | 2021-10-13 12:13:41 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-13 18:44:49 -0400 |
commit | e46edfcf47d674731935b2ea1443cc7927e071fb (patch) | |
tree | 81e584d1f3cf1ed6bfac4d741568faabbfd1db23 /testsuite/tests | |
parent | 64460b20bce7d0979215bdde33f2f7d1248b5003 (diff) | |
download | haskell-e46edfcf47d674731935b2ea1443cc7927e071fb.tar.gz |
Set logger flags in --backpack mode
Backpack used to initialise the logger before obtaining the
DynFlags. This meant that logging options (such as dump flags)
were not set.
Initialising the logger after the session flags have been set
fixes the issue.
fixes #20396
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/backpack/should_compile/T20396.bkp | 7 | ||||
-rw-r--r-- | testsuite/tests/backpack/should_compile/T20396.stderr | 22 | ||||
-rw-r--r-- | testsuite/tests/backpack/should_compile/all.T | 1 |
3 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/tests/backpack/should_compile/T20396.bkp b/testsuite/tests/backpack/should_compile/T20396.bkp new file mode 100644 index 0000000000..eff8b66316 --- /dev/null +++ b/testsuite/tests/backpack/should_compile/T20396.bkp @@ -0,0 +1,7 @@ + +{-# OPTIONS_GHC -ddump-simpl -dsuppress-all -dsuppress-uniques #-} + +unit unit where + module A where + f :: Int -> Int + f x = x diff --git a/testsuite/tests/backpack/should_compile/T20396.stderr b/testsuite/tests/backpack/should_compile/T20396.stderr new file mode 100644 index 0000000000..702ab87ffe --- /dev/null +++ b/testsuite/tests/backpack/should_compile/T20396.stderr @@ -0,0 +1,22 @@ +[1 of 1] Processing unit + Instantiating unit + [1 of 1] Compiling A ( unit\A.hs, T20396.out\unit\A.o ) + +==================== Tidy Core ==================== +Result size of Tidy Core + = {terms: 17, types: 8, coercions: 0, joins: 0/0} + +f = \ x -> x + +$trModule1 = "unit"# + +$trModule2 = TrNameS $trModule1 + +$trModule3 = "A"# + +$trModule4 = TrNameS $trModule3 + +$trModule = Module $trModule2 $trModule4 + + + diff --git a/testsuite/tests/backpack/should_compile/all.T b/testsuite/tests/backpack/should_compile/all.T index ac8c2a7ed8..07c1ed27ec 100644 --- a/testsuite/tests/backpack/should_compile/all.T +++ b/testsuite/tests/backpack/should_compile/all.T @@ -58,3 +58,4 @@ test('T13149', expect_broken(13149), backpack_compile, ['']) test('T13214', normal, backpack_compile, ['']) test('T13250', normal, backpack_compile, ['']) test('T13323', normal, backpack_compile, ['']) +test('T20396', normal, backpack_compile, ['']) |