summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/numeric')
-rw-r--r--testsuite/tests/numeric/should_compile/T14170.stdout6
-rw-r--r--testsuite/tests/numeric/should_compile/T14465.stdout10
-rw-r--r--testsuite/tests/numeric/should_compile/T20245.hs9
-rw-r--r--testsuite/tests/numeric/should_compile/T20245.stderr9
-rw-r--r--testsuite/tests/numeric/should_compile/all.T1
5 files changed, 27 insertions, 8 deletions
diff --git a/testsuite/tests/numeric/should_compile/T14170.stdout b/testsuite/tests/numeric/should_compile/T14170.stdout
index a4fe7ecd7b..89e0f1b461 100644
--- a/testsuite/tests/numeric/should_compile/T14170.stdout
+++ b/testsuite/tests/numeric/should_compile/T14170.stdout
@@ -1,7 +1,7 @@
==================== Tidy Core ====================
Result size of Tidy Core
- = {terms: 16, types: 6, coercions: 0, joins: 0/0}
+ = {terms: 17, types: 6, coercions: 0, joins: 0/0}
NatVal.$trModule4 :: GHC.Prim.Addr#
[GblId,
@@ -37,8 +37,8 @@ NatVal.$trModule
foo :: Integer
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
-foo = 0
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+foo = GHC.Num.Integer.IS 0#
diff --git a/testsuite/tests/numeric/should_compile/T14465.stdout b/testsuite/tests/numeric/should_compile/T14465.stdout
index 808b75f633..de0c34607d 100644
--- a/testsuite/tests/numeric/should_compile/T14465.stdout
+++ b/testsuite/tests/numeric/should_compile/T14465.stdout
@@ -1,7 +1,7 @@
==================== Tidy Core ====================
Result size of Tidy Core
- = {terms: 35, types: 14, coercions: 0, joins: 0/0}
+ = {terms: 37, types: 14, coercions: 0, joins: 0/0}
ten :: Natural
[GblId,
@@ -42,8 +42,8 @@ M.$trModule = GHC.Types.Module M.$trModule3 M.$trModule1
M.minusOne1 :: Natural
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
-M.minusOne1 = 1
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+M.minusOne1 = GHC.Num.Natural.NS 1##
minusOne :: Natural
[GblId,
@@ -58,8 +58,8 @@ minusOne
twoTimesTwo :: Natural
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
-twoTimesTwo = 4
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+twoTimesTwo = GHC.Num.Natural.NS 4##
plusOne :: Natural -> Natural
[GblId,
diff --git a/testsuite/tests/numeric/should_compile/T20245.hs b/testsuite/tests/numeric/should_compile/T20245.hs
new file mode 100644
index 0000000000..1196987cf9
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T20245.hs
@@ -0,0 +1,9 @@
+module T20245 where
+
+import GHC.Num.Integer
+
+foo :: Int
+foo = case 2 of
+ IS _ -> 9999
+ IP _ -> 7777
+ IN _ -> 7777
diff --git a/testsuite/tests/numeric/should_compile/T20245.stderr b/testsuite/tests/numeric/should_compile/T20245.stderr
new file mode 100644
index 0000000000..e3fe0ed315
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T20245.stderr
@@ -0,0 +1,9 @@
+
+==================== Tidy Core ====================
+Result size of Tidy Core
+ = {terms: 3, types: 1, coercions: 0, joins: 0/0}
+
+foo = I# 9999#
+
+
+
diff --git a/testsuite/tests/numeric/should_compile/all.T b/testsuite/tests/numeric/should_compile/all.T
index 425d0dbd85..c95296fcde 100644
--- a/testsuite/tests/numeric/should_compile/all.T
+++ b/testsuite/tests/numeric/should_compile/all.T
@@ -11,3 +11,4 @@ test('T10929', normal, compile, [''])
test('T16402', [ grep_errmsg(r'and'), when(wordsize(32), expect_broken(19024)) ], compile, [''])
test('T19892', normal, compile, ['-O -ddump-rule-firings'])
test('T20062', [ grep_errmsg(r'integer') ], compile, ['-ddump-simpl -O -dsuppress-all'])
+test('T20245', normal, compile, ['-ddump-simpl -O -dsuppress-all -dno-typeable-binds'])