diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-08-12 17:44:15 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-11 08:54:29 -0400 |
commit | 089de88ef5215de0f2db4c4babc556ac43f8232e (patch) | |
tree | c036813b9625dbb45b4577b09ec6ad31c45c1bce /testsuite/tests/lib | |
parent | 74a87aa3046f3eb871e5442579e9a2945ef691d4 (diff) | |
download | haskell-089de88ef5215de0f2db4c4babc556ac43f8232e.tar.gz |
Canonicalize bignum literals
Before this patch Integer and Natural literals were desugared into "real"
Core in Core prep. Now we desugar them directly into their final ConApp
form in HsToCore. We only keep the double representation for BigNat#
(literals larger than a machine Word/Int) which are still desugared in
Core prep.
Using the final form directly allows case-of-known-constructor to fire
for bignum literals, fixing #20245.
Slight increase (+2.3) in T4801 which is a pathological case with
Integer literals.
Metric Increase:
T4801
T11545
Diffstat (limited to 'testsuite/tests/lib')
-rw-r--r-- | testsuite/tests/lib/integer/all.T | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/testsuite/tests/lib/integer/all.T b/testsuite/tests/lib/integer/all.T index 4366955e81..96cb055b9c 100644 --- a/testsuite/tests/lib/integer/all.T +++ b/testsuite/tests/lib/integer/all.T @@ -5,12 +5,7 @@ test('plusMinusInteger', [omit_ways(['ghci'])], compile_and_run, ['']) test('integerConstantFolding', normal, makefile_test, ['integerConstantFolding']) test('naturalConstantFolding', normal, makefile_test, ['naturalConstantFolding']) -# we ignore_stderr because there are 2 overlapping rules that are reported in -# debug mode: -# Rules.findBest: rule overlap (Rule 1 wins) -# Rule 1: "Integer -> Int# (wrap)" -# Rule 2: "Int# -> Integer -> Int#" -test('fromToInteger', [ignore_stderr], makefile_test, ['fromToInteger']) +test('fromToInteger', normal, makefile_test, ['fromToInteger']) test('IntegerConversionRules', [], makefile_test, ['IntegerConversionRules']) test('gcdInteger', normal, compile_and_run, ['']) |