summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-08-11 16:20:53 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-07 08:02:28 -0400
commitf72aa31d36f4fbab0258cae1c94ac0cc24682ab9 (patch)
treebfdd65d170c425272f066a851b26bec3bdf34d96 /testsuite/tests/numeric
parent3fb1afea019422292954785575902c62473e93e3 (diff)
downloadhaskell-f72aa31d36f4fbab0258cae1c94ac0cc24682ab9.tar.gz
Bignum: refactor conversion rules
* make "passthrough" rules non built-in: they don't need to * enhance note about efficient conversions between numeric types * make integerFromNatural a little more efficient * fix noinline pragma for naturalToWordClamp# (at least with non built-in rules, we get warnings in cases like this)
Diffstat (limited to 'testsuite/tests/numeric')
-rw-r--r--testsuite/tests/numeric/should_compile/T14465.stdout8
-rw-r--r--testsuite/tests/numeric/should_compile/T19892.stderr6
2 files changed, 7 insertions, 7 deletions
diff --git a/testsuite/tests/numeric/should_compile/T14465.stdout b/testsuite/tests/numeric/should_compile/T14465.stdout
index 7c2e846101..d640a017cc 100644
--- a/testsuite/tests/numeric/should_compile/T14465.stdout
+++ b/testsuite/tests/numeric/should_compile/T14465.stdout
@@ -1,14 +1,14 @@
==================== Tidy Core ====================
Result size of Tidy Core
- = {terms: 34, types: 14, coercions: 0, joins: 0/0}
+ = {terms: 35, types: 14, coercions: 0, joins: 0/0}
--- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
ten :: Natural
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
-ten = 10
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+ten = GHC.Num.Natural.NS 10##
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
M.$trModule4 :: GHC.Prim.Addr#
diff --git a/testsuite/tests/numeric/should_compile/T19892.stderr b/testsuite/tests/numeric/should_compile/T19892.stderr
index 89411a6df9..a82ea9d9d2 100644
--- a/testsuite/tests/numeric/should_compile/T19892.stderr
+++ b/testsuite/tests/numeric/should_compile/T19892.stderr
@@ -1,4 +1,4 @@
-Rule fired: Int# -> Integer -> Word# (BUILTIN)
+Rule fired: Int# -> Integer -> Word# (GHC.Num.Integer)
Rule fired: int2Word# (BUILTIN)
-Rule fired: Int# -> Integer -> Int# (BUILTIN)
-Rule fired: Word# -> Natural -> Word# (BUILTIN)
+Rule fired: Int# -> Integer -> Int# (GHC.Num.Integer)
+Rule fired: Word# -> Natural -> Word# (GHC.Num.Natural)