summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2019-01-08 10:50:30 -0800
committerBen Gamari <ben@smart-cactus.org>2019-01-16 14:17:11 -0500
commitd2eb344a38f6c727040ba76e584aeaca8e8aefb3 (patch)
tree8e12f97679d9c1122742be631df08af2a6d83a28
parentf7def747cf0da103237cd17af5c8bfdbdf5823b2 (diff)
downloadhaskell-d2eb344a38f6c727040ba76e584aeaca8e8aefb3.tar.gz
Fix tests for `integer-simple`
A bunch of tests for `integer-simple` were now broken for a foolish reason: unlike the `integer-gmp` case, there is no CorePrep optimization for turning small integers directly into applications of `S#`. Rather than port this optimization to `integer-simple` (which would involve moving a bunch of `integer-simple` names into `PrelNames`), I switched as many tests as possible to use `Int`. The printing of `Integer` is already tested in `print037`.
-rw-r--r--testsuite/driver/testlib.py3
-rw-r--r--testsuite/tests/ghci.debugger/GADT.hs4
-rw-r--r--testsuite/tests/ghci.debugger/QSort.hs4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T2740.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T2740.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/all.T52
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break001.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break001.stdout12
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break005.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break005.stdout8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.script4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stdout24
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break026.script4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break026.stdout52
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break027.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break027.stdout10
-rw-r--r--testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print002.script12
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print002.stdout1
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print003.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print003.stdout5
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print005.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print005.stdout22
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print006.script4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print006.stdout5
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print008.script4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print008.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print012.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print013.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print014.script2
-rw-r--r--testsuite/tests/ghci/scripts/T2976.script2
-rw-r--r--testsuite/tests/ghci/scripts/T2976.stdout4
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T4
-rw-r--r--testsuite/tests/ghci/scripts/ghci055.script2
-rw-r--r--testsuite/tests/ghci/scripts/ghci055.stdout2
-rw-r--r--testsuite/tests/lib/integer/all.T2
36 files changed, 143 insertions, 141 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 96024a9a64..c09d02aab2 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -467,9 +467,6 @@ def have_gdb( ):
def have_readelf( ):
return config.have_readelf
-# Many tests sadly break with integer-simple due to GHCi's ignorance of it.
-broken_without_gmp = unless(have_library('integer-gmp'), expect_broken(16043))
-
# ---
def high_memory_usage(name, opts):
diff --git a/testsuite/tests/ghci.debugger/GADT.hs b/testsuite/tests/ghci.debugger/GADT.hs
index a99c1156b9..52f0c30bb4 100644
--- a/testsuite/tests/ghci.debugger/GADT.hs
+++ b/testsuite/tests/ghci.debugger/GADT.hs
@@ -9,7 +9,7 @@ data SafeList x y where
safeHead :: SafeList x NonEmpty -> x
safeHead (Cons x _) = x
-foo = Cons 3 (Cons 6 (Cons 9 Nil))
+foo = Cons (3 :: Int) (Cons 6 (Cons 9 Nil))
data Dict x where
@@ -17,4 +17,4 @@ data Dict x where
DictE :: Eq x => x -> Dict x
data Exist where
- Exist :: forall a. a -> Exist \ No newline at end of file
+ Exist :: forall a. a -> Exist
diff --git a/testsuite/tests/ghci.debugger/QSort.hs b/testsuite/tests/ghci.debugger/QSort.hs
index aa45aa14e5..8bf6653de3 100644
--- a/testsuite/tests/ghci.debugger/QSort.hs
+++ b/testsuite/tests/ghci.debugger/QSort.hs
@@ -5,7 +5,7 @@ qsort [] = []
qsort (a:as) = (qsort left) ++ [a] ++ (qsort right)
where (left,right) = (filter (<=a) as, filter (>a) as)
-run = qsort [8, 4, 0, 3, 1, 23, 11, 18]
+run = qsort [8 :: Int, 4, 0, 3, 1, 23, 11, 18]
-- > run
--- [0,1,3,4,8,11,18,23] \ No newline at end of file
+-- [0,1,3,4,8,11,18,23]
diff --git a/testsuite/tests/ghci.debugger/scripts/T2740.script b/testsuite/tests/ghci.debugger/scripts/T2740.script
index 68554eca2e..4ae19aac93 100644
--- a/testsuite/tests/ghci.debugger/scripts/T2740.script
+++ b/testsuite/tests/ghci.debugger/scripts/T2740.script
@@ -1,6 +1,6 @@
:seti -XMonomorphismRestriction
:l T2740.hs
-:step f 1 2 3
+:step f (1 :: Int) 2 3
:print x
:print y
:force x
diff --git a/testsuite/tests/ghci.debugger/scripts/T2740.stdout b/testsuite/tests/ghci.debugger/scripts/T2740.stdout
index efa5b1dd1e..21d08f5df2 100644
--- a/testsuite/tests/ghci.debugger/scripts/T2740.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/T2740.stdout
@@ -1,7 +1,7 @@
Stopped in Test.f, T2740.hs:3:11-13
_result :: Bool = _
-x :: Integer = 1
-y :: Integer = 2
+x :: Int = 1
+y :: Int = 2
x = 1
y = 2
x = 1
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T
index 985f065d1f..4095cf2c0b 100644
--- a/testsuite/tests/ghci.debugger/scripts/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/all.T
@@ -3,22 +3,22 @@ setTestOpts([extra_run_opts('-ignore-dot-ghci'),
normalise_slashes])
-test('print001', broken_without_gmp, ghci_script, ['print001.script'])
-test('print002', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print002.script'])
-test('print003', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print003.script'])
-test('print004', broken_without_gmp, ghci_script, ['print004.script'])
-test('print005', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['print005.script'])
-test('print006', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print006.script'])
+test('print001', normal, ghci_script, ['print001.script'])
+test('print002', extra_files(['../Test.hs']), ghci_script, ['print002.script'])
+test('print003', extra_files(['../Test.hs']), ghci_script, ['print003.script'])
+test('print004', normal, ghci_script, ['print004.script'])
+test('print005', extra_files(['../QSort.hs']), ghci_script, ['print005.script'])
+test('print006', extra_files(['../Test.hs']), ghci_script, ['print006.script'])
test('print007', extra_files(['../Test.hs']), ghci_script, ['print007.script'])
-test('print008', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print008.script'])
+test('print008', extra_files(['../Test.hs']), ghci_script, ['print008.script'])
test('print009', normal, ghci_script, ['print009.script'])
-test('print010', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print010.script'])
+test('print010', extra_files(['../Test.hs']), ghci_script, ['print010.script'])
test('print011', extra_files(['../Test.hs']), ghci_script, ['print011.script'])
-test('print012', [broken_without_gmp, extra_files(['../GADT.hs', '../Test.hs'])], ghci_script, ['print012.script'])
-test('print013', [broken_without_gmp, extra_files(['../GADT.hs'])], ghci_script, ['print013.script'])
-test('print014', [broken_without_gmp, extra_files(['../GADT.hs'])], ghci_script, ['print014.script'])
-test('print016', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print016.script'])
-test('print017', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print017.script'])
+test('print012', extra_files(['../GADT.hs', '../Test.hs']), ghci_script, ['print012.script'])
+test('print013', extra_files(['../GADT.hs']), ghci_script, ['print013.script'])
+test('print014', extra_files(['../GADT.hs']), ghci_script, ['print014.script'])
+test('print016', extra_files(['../Test.hs']), ghci_script, ['print016.script'])
+test('print017', extra_files(['../Test.hs']), ghci_script, ['print017.script'])
test('print018', extra_files(['../Test.hs']), ghci_script, ['print018.script'])
test('print019', extra_files(['../Test.hs']), ghci_script, ['print019.script'])
@@ -31,12 +31,12 @@ test('print021', normal, ghci_script, ['print021.script'])
test('print022',
[when(arch('powerpc64'), expect_broken(14455))],
ghci_script, ['print022.script'])
-test('print023', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print023.script'])
-test('print024', [broken_without_gmp, extra_files(['../Test.hs'])], ghci_script, ['print024.script'])
+test('print023', extra_files(['../Test.hs']), ghci_script, ['print023.script'])
+test('print024', extra_files(['../Test.hs']), ghci_script, ['print024.script'])
test('print025', normal, ghci_script, ['print025.script'])
test('print026', normal, ghci_script, ['print026.script'])
test('print027', normal, ghci_script, ['print027.script'])
-test('print028', broken_without_gmp, ghci_script, ['print028.script'])
+test('print028', normal, ghci_script, ['print028.script'])
test('print029', normal, ghci_script, ['print029.script'])
test('print030', extra_files(['print029.hs']), ghci_script, ['print030.script'])
test('print031', normal, ghci_script, ['print031.script'])
@@ -47,11 +47,11 @@ test('print035', extra_files(['../Unboxed.hs']), ghci_script, ['print035.script'
test('print036', expect_broken(9046), ghci_script, ['print036.script'])
test('print037', normal, ghci_script, ['print037.script'])
-test('break001', [broken_without_gmp, extra_files(['../Test2.hs'])], ghci_script, ['break001.script'])
+test('break001', extra_files(['../Test2.hs']), ghci_script, ['break001.script'])
test('break002', extra_files(['../Test2.hs']), ghci_script, ['break002.script'])
test('break003', extra_files(['../Test3.hs']), ghci_script, ['break003.script'])
-test('break005', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['break005.script'])
-test('break006', [broken_without_gmp, extra_files(['../Test3.hs'])], ghci_script, ['break006.script'])
+test('break005', extra_files(['../QSort.hs']), ghci_script, ['break005.script'])
+test('break006', extra_files(['../Test3.hs']), ghci_script, ['break006.script'])
test('break007', extra_files(['Break007.hs']), ghci_script, ['break007.script'])
test('break008', extra_files(['../Test3.hs']), ghci_script, ['break008.script'])
test('break009', [extra_files(['../Test6.hs']),
@@ -74,12 +74,10 @@ test('break020', extra_files(['Break020b.hs']), ghci_script, ['break020.script']
test('break021', extra_files(['Break020b.hs', 'break020.hs']), ghci_script, ['break021.script'])
test('break024', combined_output, ghci_script, ['break024.script'])
test('break025', normal, ghci_script, ['break025.script'])
-test('break026', broken_without_gmp, ghci_script, ['break026.script'])
-test('break027', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['break027.script'])
-test('break028', normal, ghci_script, ['break028.script'])
-
+test('break026', normal, ghci_script, ['break026.script'])
+test('break027', extra_files(['../QSort.hs']), ghci_script, ['break027.script'])
test('dynbrk001', extra_files(['../QSort.hs']), ghci_script, ['dynbrk001.script'])
-test('dynbrk002', [broken_without_gmp, extra_files(['../QSort.hs'])], ghci_script, ['dynbrk002.script'])
+test('dynbrk002', extra_files(['../QSort.hs']), ghci_script, ['dynbrk002.script'])
test('dynbrk003', normal, ghci_script, ['dynbrk003.script'])
test('dynbrk004', extra_files(['../mdo.hs']), ghci_script, ['dynbrk004.script'])
test('dynbrk005', [extra_files(['TupleN.hs']), expect_broken(1530)],
@@ -94,12 +92,12 @@ test('listCommand001', [extra_files(['../Test3.hs']),
combined_output], ghci_script, ['listCommand001.script'])
test('listCommand002', normal, ghci_script, ['listCommand002.script'])
-test('hist001', [broken_without_gmp, extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
+test('hist001', [extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
ghci_script, ['hist001.script'])
-test('hist002', [broken_without_gmp, extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
+test('hist002', [extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')],
ghci_script, ['hist002.script'])
-test('T2740', broken_without_gmp, ghci_script, ['T2740.script'])
+test('T2740', normal, ghci_script, ['T2740.script'])
test('getargs', extra_files(['../getargs.hs']), ghci_script, ['getargs.script'])
test('T7386', normal, ghci_script, ['T7386.script'])
diff --git a/testsuite/tests/ghci.debugger/scripts/break001.script b/testsuite/tests/ghci.debugger/scripts/break001.script
index 3e82465416..29e9061bd3 100644
--- a/testsuite/tests/ghci.debugger/scripts/break001.script
+++ b/testsuite/tests/ghci.debugger/scripts/break001.script
@@ -1,7 +1,7 @@
:l Test2
:b 3
:b 5
-f (1 :: Integer)
+f (1 :: Int)
:st
-- Test that the binding for x is now gone
:show bindings
diff --git a/testsuite/tests/ghci.debugger/scripts/break001.stdout b/testsuite/tests/ghci.debugger/scripts/break001.stdout
index 50be9af2cc..7035306c29 100644
--- a/testsuite/tests/ghci.debugger/scripts/break001.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break001.stdout
@@ -1,13 +1,13 @@
Breakpoint 0 activated at Test2.hs:3:7-9
Breakpoint 1 activated at Test2.hs:5:7
Stopped in Test2.f, Test2.hs:3:7-9
-_result :: Integer = _
-x :: Integer = 1
+_result :: Int = _
+x :: Int = 1
Stopped in Test2.g, Test2.hs:5:7
-_result :: Integer = _
-y :: Integer = 1
-y :: Integer = 1
-_result :: Integer = _
+_result :: Int = _
+y :: Int = 1
+y :: Int = 1
+_result :: Int = _
1
y = 1
()
diff --git a/testsuite/tests/ghci.debugger/scripts/break005.script b/testsuite/tests/ghci.debugger/scripts/break005.script
index 8d2f262cd3..0efb0207ce 100644
--- a/testsuite/tests/ghci.debugger/scripts/break005.script
+++ b/testsuite/tests/ghci.debugger/scripts/break005.script
@@ -1,5 +1,5 @@
:l QSort
-:st qsort [1::Integer,2]
+:st qsort [1::Int,2]
:step
seq left ()
:print left
diff --git a/testsuite/tests/ghci.debugger/scripts/break005.stdout b/testsuite/tests/ghci.debugger/scripts/break005.stdout
index 4311e70fb6..d741d5daa1 100644
--- a/testsuite/tests/ghci.debugger/scripts/break005.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break005.stdout
@@ -1,8 +1,8 @@
Stopped in QSort.qsort, QSort.hs:5:16-51
-_result :: [Integer] = _
-a :: Integer = 1
-left :: [Integer] = _
-right :: [Integer] = _
+_result :: [Int] = _
+a :: Int = 1
+left :: [Int] = _
+right :: [Int] = _
Stopped in QSort.qsort, QSort.hs:5:17-26
_result :: [a] = _
left :: [a] = _
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.script b/testsuite/tests/ghci.debugger/scripts/break006.script
index 9546290fd4..1d611a4232 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.script
+++ b/testsuite/tests/ghci.debugger/scripts/break006.script
@@ -1,5 +1,5 @@
:l Test3.hs
-:st mymap (+1) [1::Integer,2,3]
+:st mymap (+1) [1::Int,2,3]
:show bindings
f x -- should fail, unknown return type
let y = f x
@@ -7,6 +7,6 @@ y
:p y
:force y
:show bindings
--- we know the result is Integer now
+-- we know the result is Int now
f x
-- should work now
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stdout b/testsuite/tests/ghci.debugger/scripts/break006.stdout
index cd9f6ea1fe..2b4a6c20f8 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stdout
@@ -1,18 +1,18 @@
Stopped in Main.mymap, Test3.hs:2:18-31
_result :: [a] = _
-f :: Integer -> a = _
-x :: Integer = 1
-xs :: [Integer] = [2,3]
-xs :: [Integer] = [2,3]
-f :: Integer -> a = _
-x :: Integer = 1
+f :: Int -> a = _
+x :: Int = 1
+xs :: [Int] = [2,3]
+xs :: [Int] = [2,3]
+f :: Int -> a = _
+x :: Int = 1
_result :: [a] = _
y = (_t1::a)
y = 2
-xs :: [Integer] = [2,3]
-f :: Integer -> Integer = _
-x :: Integer = 1
-_result :: [Integer] = _
-y :: Integer = 2
-_t1 :: Integer = 2
+xs :: [Int] = [2,3]
+f :: Int -> Int = _
+x :: Int = 1
+_result :: [Int] = _
+y :: Int = 2
+_t1 :: Int = 2
2
diff --git a/testsuite/tests/ghci.debugger/scripts/break026.script b/testsuite/tests/ghci.debugger/scripts/break026.script
index 3d1da54f4d..d0de5ceae2 100644
--- a/testsuite/tests/ghci.debugger/scripts/break026.script
+++ b/testsuite/tests/ghci.debugger/scripts/break026.script
@@ -1,12 +1,12 @@
:load break026
-:step foldl (+) 0 [1::Integer .. 5]
+:step foldl (+) 0 [1::Int .. 5]
:step
:step
:force c
-- answer should be 1
:load break026
-:step foldl (+) 0 [1::Integer .. 5]
+:step foldl (+) 0 [1::Int .. 5]
:step
:step
-- a diversion to single-step the evaluation of c:
diff --git a/testsuite/tests/ghci.debugger/scripts/break026.stdout b/testsuite/tests/ghci.debugger/scripts/break026.stdout
index 90c1f2ee9e..79acc3d8ac 100644
--- a/testsuite/tests/ghci.debugger/scripts/break026.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break026.stdout
@@ -1,42 +1,42 @@
Stopped in Test.foldl, break026.hs:5:16-22
-_result :: Integer = _
-c :: Integer = 0
-go :: Integer -> [t1] -> Integer = _
+_result :: Int = _
+c :: Int = 0
+go :: Int -> [t1] -> Int = _
xs :: [t1] = _
Stopped in Test.foldl.go, break026.hs:7:23-35
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-xs :: [Integer] = _
+_result :: Int = _
+c :: Int = 0
+f :: Int -> Int -> Int = _
+x :: Int = 1
+xs :: [Int] = _
Stopped in Test.foldl.go, break026.hs:7:23-35
_result :: t = _
c :: t = _
-f :: t -> Integer -> t = _
-x :: Integer = 2
-xs :: [Integer] = _
+f :: t -> Int -> t = _
+x :: Int = 2
+xs :: [Int] = _
c = 1
Stopped in Test.foldl, break026.hs:5:16-22
-_result :: Integer = _
-c :: Integer = 0
-go :: Integer -> [t1] -> Integer = _
+_result :: Int = _
+c :: Int = 0
+go :: Int -> [t1] -> Int = _
xs :: [t1] = _
Stopped in Test.foldl.go, break026.hs:7:23-35
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-xs :: [Integer] = _
+_result :: Int = _
+c :: Int = 0
+f :: Int -> Int -> Int = _
+x :: Int = 1
+xs :: [Int] = _
Stopped in Test.foldl.go, break026.hs:7:23-35
_result :: t = _
c :: t = _
-f :: t -> Integer -> t = _
-x :: Integer = 2
-xs :: [Integer] = _
+f :: t -> Int -> t = _
+x :: Int = 2
+xs :: [Int] = _
Stopped in Test.foldl.go, break026.hs:7:27-31
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
+_result :: Int = _
+c :: Int = 0
+f :: Int -> Int -> Int = _
+x :: Int = 1
()
1
diff --git a/testsuite/tests/ghci.debugger/scripts/break027.script b/testsuite/tests/ghci.debugger/scripts/break027.script
index b1d4de116a..56955803fa 100644
--- a/testsuite/tests/ghci.debugger/scripts/break027.script
+++ b/testsuite/tests/ghci.debugger/scripts/break027.script
@@ -1,4 +1,4 @@
:l QSort
:break qsort
-qsort [3::Integer,2,1]
+qsort [3::Int,2,1]
:i a
diff --git a/testsuite/tests/ghci.debugger/scripts/break027.stdout b/testsuite/tests/ghci.debugger/scripts/break027.stdout
index f9c2d20de2..277fabcf1b 100644
--- a/testsuite/tests/ghci.debugger/scripts/break027.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break027.stdout
@@ -1,8 +1,8 @@
Breakpoint 0 activated at QSort.hs:4:12-13
Breakpoint 1 activated at QSort.hs:5:16-51
Stopped in QSort.qsort, QSort.hs:5:16-51
-_result :: [Integer] = _
-a :: Integer = 3
-left :: [Integer] = _
-right :: [Integer] = _
-a :: Integer -- Defined in ‘interactive:Ghci1’
+_result :: [Int] = _
+a :: Int = 3
+left :: [Int] = _
+right :: [Int] = _
+a :: Int -- Defined in ‘interactive:Ghci1’
diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout b/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout
index ef46c58bf5..d2c17a44be 100644
--- a/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout
@@ -1,6 +1,6 @@
Breakpoint 0 activated at QSort.hs:5:16-51
Stopped in QSort.qsort, QSort.hs:5:16-51
-_result :: [Integer] = _
-a :: Integer = 8
-left :: [Integer] = _
-right :: [Integer] = _
+_result :: [Int] = _
+a :: Int = 8
+left :: [Int] = _
+right :: [Int] = _
diff --git a/testsuite/tests/ghci.debugger/scripts/print002.script b/testsuite/tests/ghci.debugger/scripts/print002.script
index af39d1384f..401af2c212 100644
--- a/testsuite/tests/ghci.debugger/scripts/print002.script
+++ b/testsuite/tests/ghci.debugger/scripts/print002.script
@@ -5,7 +5,15 @@ let f = Just (1.2::Float)
f
:p f
-let i = Just (10::Integer)
+-- With @integer-gmp@, small integer literals get converted directly into
+-- @S# 10#@. This optimization means that small integers are always already
+-- evaluated in the output for @:p@.
+--
+-- Since we want this test to work on @integer-simple@ too, we explicitly
+-- force the literal.
+let ten = 10 :: Integer
+:f ten
+let i = Just ten
:p i
case i of Just j -> Control.Exception.evaluate j
@@ -16,4 +24,4 @@ case i of Just j -> Control.Exception.evaluate j
let s = S1 'a' 'b' 'c'
s
:p s
-:sp s \ No newline at end of file
+:sp s
diff --git a/testsuite/tests/ghci.debugger/scripts/print002.stdout b/testsuite/tests/ghci.debugger/scripts/print002.stdout
index 822c69ec19..a73820a6ef 100644
--- a/testsuite/tests/ghci.debugger/scripts/print002.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print002.stdout
@@ -1,5 +1,6 @@
Just 1.2
f = Just 1.2
+ten = 10
i = Just 10
10
i = Just 10
diff --git a/testsuite/tests/ghci.debugger/scripts/print003.script b/testsuite/tests/ghci.debugger/scripts/print003.script
index e9f6094592..6b6271ae80 100644
--- a/testsuite/tests/ghci.debugger/scripts/print003.script
+++ b/testsuite/tests/ghci.debugger/scripts/print003.script
@@ -1,7 +1,7 @@
-- Simple Recovery of types - opaque types
:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l Test
-let t = O (map Just [[1,1],[2,2]])
+let t = O (map Just [[1 :: Int,1],[2,2]])
:p t
-- should have bound _t1 now
:show bindings
diff --git a/testsuite/tests/ghci.debugger/scripts/print003.stdout b/testsuite/tests/ghci.debugger/scripts/print003.stdout
index 23b0543c1f..6d767acb2a 100644
--- a/testsuite/tests/ghci.debugger/scripts/print003.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print003.stdout
@@ -9,7 +9,6 @@ it :: () = ()
_t3 :: [a0] = _
_t2 :: a0 = _
()
-t = O (Just [1,1] : (_t4::[Maybe [Integer]]))
+t = O (Just [1,1] : (_t4::[Maybe [Int]]))
()
-t = O (Just [1,1] : (_t5::Maybe [Integer]) :
- (_t6::[Maybe [Integer]]))
+t = O (Just [1,1] : (_t5::Maybe [Int]) : (_t6::[Maybe [Int]]))
diff --git a/testsuite/tests/ghci.debugger/scripts/print005.script b/testsuite/tests/ghci.debugger/scripts/print005.script
index 49c0799de5..dffd36c4d3 100644
--- a/testsuite/tests/ghci.debugger/scripts/print005.script
+++ b/testsuite/tests/ghci.debugger/scripts/print005.script
@@ -2,7 +2,7 @@
:l QSort
:break 5
-qsort [8::Integer, 4]
+qsort [8::Int, 4]
:p right
seq right ()
diff --git a/testsuite/tests/ghci.debugger/scripts/print005.stdout b/testsuite/tests/ghci.debugger/scripts/print005.stdout
index 40e5104749..64383baa98 100644
--- a/testsuite/tests/ghci.debugger/scripts/print005.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print005.stdout
@@ -1,19 +1,19 @@
Breakpoint 0 activated at QSort.hs:5:16-51
Stopped in QSort.qsort, QSort.hs:5:16-51
-_result :: [Integer] = _
-a :: Integer = 8
-left :: [Integer] = _
-right :: [Integer] = _
-right = (_t1::[Integer])
+_result :: [Int] = _
+a :: Int = 8
+left :: [Int] = _
+right :: [Int] = _
+right = (_t1::[Int])
()
right = []
-left = (_t2::[Integer])
+left = (_t2::[Int])
()
-left = 4 : (_t3::[Integer])
+left = 4 : (_t3::[Int])
1
left = [4]
Stopped in QSort.qsort, QSort.hs:5:16-51
-_result :: [Integer] = _
-a :: Integer = 4
-left :: [Integer] = _
-right :: [Integer] = _
+_result :: [Int] = _
+a :: Int = 4
+left :: [Int] = _
+right :: [Int] = _
diff --git a/testsuite/tests/ghci.debugger/scripts/print006.script b/testsuite/tests/ghci.debugger/scripts/print006.script
index 782dee6102..5ab4cdea57 100644
--- a/testsuite/tests/ghci.debugger/scripts/print006.script
+++ b/testsuite/tests/ghci.debugger/scripts/print006.script
@@ -3,7 +3,7 @@
:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l Test
-let t = O (map Just [[1,1],[2,2]])
+let t = O (map Just [[1 :: Int,1],[2,2]])
:p t
seq _t1 () -- The contents of the opaque
:p t
@@ -14,4 +14,4 @@ seq _t5 () -- The 2nd element of the list
seq _t7 () -- The 1st element of the outer list
:p t
- -- The 1st Just must be completely typed, as we know the type of the list \ No newline at end of file
+ -- The 1st Just must be completely typed, as we know the type of the list
diff --git a/testsuite/tests/ghci.debugger/scripts/print006.stdout b/testsuite/tests/ghci.debugger/scripts/print006.stdout
index e508e68c34..744f1e032a 100644
--- a/testsuite/tests/ghci.debugger/scripts/print006.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print006.stdout
@@ -4,7 +4,6 @@ t = O ((_t2::a0) : (_t3::[a0]))
()
t = O ((_t4::a1) : (_t5::a1) : (_t6::[a1]))
()
-t = O ((_t7::Maybe [Integer]) : Just [2,2] :
- (_t8::[Maybe [Integer]]))
+t = O ((_t7::Maybe [Int]) : Just [2,2] : (_t8::[Maybe [Int]]))
()
-t = O (Just [1,1] : Just [2,2] : (_t9::[Maybe [Integer]]))
+t = O (Just [1,1] : Just [2,2] : (_t9::[Maybe [Int]]))
diff --git a/testsuite/tests/ghci.debugger/scripts/print008.script b/testsuite/tests/ghci.debugger/scripts/print008.script
index 51b44a6d67..3a6b2910ed 100644
--- a/testsuite/tests/ghci.debugger/scripts/print008.script
+++ b/testsuite/tests/ghci.debugger/scripts/print008.script
@@ -3,7 +3,7 @@
:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l Test
-let t = O (map Just [[1,1],[2,2]])
+let t = O (map Just [[1 :: Int,1],[2,2]])
:p t
:t _t1
@@ -11,4 +11,4 @@ seq _t1 ()
:p t
seq _t2 ()
:p t
-:t _t4 \ No newline at end of file
+:t _t4
diff --git a/testsuite/tests/ghci.debugger/scripts/print008.stdout b/testsuite/tests/ghci.debugger/scripts/print008.stdout
index 4cfb5ba7df..610746e786 100644
--- a/testsuite/tests/ghci.debugger/scripts/print008.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print008.stdout
@@ -3,5 +3,5 @@ _t1 :: a0
()
t = O ((_t2::a0) : (_t3::[a0]))
()
-t = O (Just [1,1] : (_t4::[Maybe [Integer]]))
-_t4 :: [Maybe [Integer]]
+t = O (Just [1,1] : (_t4::[Maybe [Int]]))
+_t4 :: [Maybe [Int]]
diff --git a/testsuite/tests/ghci.debugger/scripts/print012.stdout b/testsuite/tests/ghci.debugger/scripts/print012.stdout
index e77bb39b15..d7a3489f49 100644
--- a/testsuite/tests/ghci.debugger/scripts/print012.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print012.stdout
@@ -1,6 +1,6 @@
o = O (_t1::a0)
()
-_t1 :: SafeList Integer NonEmpty
-o = O (Cons 3 (_t4::SafeList Integer y0))
+_t1 :: SafeList Int NonEmpty
+o = O (Cons 3 (_t4::SafeList Int y0))
()
-o = O (Cons 3 (Cons 6 (_t9::SafeList Integer y0)))
+o = O (Cons 3 (Cons 6 (_t9::SafeList Int y0)))
diff --git a/testsuite/tests/ghci.debugger/scripts/print013.script b/testsuite/tests/ghci.debugger/scripts/print013.script
index cf8fdad2de..08add41831 100644
--- a/testsuite/tests/ghci.debugger/scripts/print013.script
+++ b/testsuite/tests/ghci.debugger/scripts/print013.script
@@ -3,7 +3,7 @@
:set -XGADTs -XRankNTypes
:l GADT
-let d = DictN (1 :: Integer)
+let d = DictN (1 :: Int)
:p d
seq _t1 ()
:p d
diff --git a/testsuite/tests/ghci.debugger/scripts/print014.script b/testsuite/tests/ghci.debugger/scripts/print014.script
index 2758d25e84..afbfa5904c 100644
--- a/testsuite/tests/ghci.debugger/scripts/print014.script
+++ b/testsuite/tests/ghci.debugger/scripts/print014.script
@@ -3,5 +3,5 @@
:set -XGADTs -XRankNTypes
:l GADT
-let e = Exist 1
+let e = Exist (1 :: Int)
:p e
diff --git a/testsuite/tests/ghci/scripts/T2976.script b/testsuite/tests/ghci/scripts/T2976.script
index 32a5472b05..0e24d28ae1 100644
--- a/testsuite/tests/ghci/scripts/T2976.script
+++ b/testsuite/tests/ghci/scripts/T2976.script
@@ -1,4 +1,4 @@
-let test = 0 :: Integer
+let test = 0 :: Int
:show bindings
:force test
:show bindings
diff --git a/testsuite/tests/ghci/scripts/T2976.stdout b/testsuite/tests/ghci/scripts/T2976.stdout
index 9fdc11072c..9c977a2cb3 100644
--- a/testsuite/tests/ghci/scripts/T2976.stdout
+++ b/testsuite/tests/ghci/scripts/T2976.stdout
@@ -1,6 +1,6 @@
-test :: Integer = 0
+test :: Int = 0
test = 0
-test :: Integer = 0
+test :: Int = 0
test :: [Char] = _
test = "test"
test :: [Char] = "test"
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 2567db4f3d..a27ab320a3 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -91,7 +91,7 @@ test('ghci051', normal, ghci_script, ['ghci051.script'])
test('ghci052', normal, ghci_script, ['ghci052.script'])
test('ghci053', normal, ghci_script, ['ghci053.script'])
test('ghci054', normal, ghci_script, ['ghci054.script'])
-test('ghci055', [broken_without_gmp, combined_output], ghci_script, ['ghci055.script'])
+test('ghci055', combined_output, ghci_script, ['ghci055.script'])
test('ghci056',
[pre_cmd('$MAKE -s --no-print-directory ghci056_setup'),
@@ -116,7 +116,7 @@ test('T1914', [], ghci_script, ['T1914.script'])
test('T2182ghci', normal, ghci_script, ['T2182ghci.script'])
test('T2182ghci2', [extra_hc_opts("-XNoImplicitPrelude")], ghci_script, ['T2182ghci2.script'])
-test('T2976', broken_without_gmp, ghci_script, ['T2976.script'])
+test('T2976', normal, ghci_script, ['T2976.script'])
test('T2816', normal, ghci_script, ['T2816.script'])
test('T789', normal, ghci_script, ['T789.script'])
test('T3263', normal, ghci_script, ['T3263.script'])
diff --git a/testsuite/tests/ghci/scripts/ghci055.script b/testsuite/tests/ghci/scripts/ghci055.script
index 5f19cfdd5c..2e3a949c1d 100644
--- a/testsuite/tests/ghci/scripts/ghci055.script
+++ b/testsuite/tests/ghci/scripts/ghci055.script
@@ -1,5 +1,5 @@
let x=undefined
-let y=3 :: Integer
+let y=3 :: Int
:force x
:show bindings
-- in 7.3 and earlier this used to print just "*** Exception:
diff --git a/testsuite/tests/ghci/scripts/ghci055.stdout b/testsuite/tests/ghci/scripts/ghci055.stdout
index f98845ccbe..c40e0d073e 100644
--- a/testsuite/tests/ghci/scripts/ghci055.stdout
+++ b/testsuite/tests/ghci/scripts/ghci055.stdout
@@ -3,4 +3,4 @@ CallStack (from HasCallStack):
error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err
undefined, called at <interactive>:1:5 in interactive:Ghci1
x :: a = _
-y :: Integer = 3
+y :: Int = 3
diff --git a/testsuite/tests/lib/integer/all.T b/testsuite/tests/lib/integer/all.T
index aa7371df0a..fda9a4a791 100644
--- a/testsuite/tests/lib/integer/all.T
+++ b/testsuite/tests/lib/integer/all.T
@@ -3,7 +3,7 @@ test('integerConversions', normal, compile_and_run, [''])
# skip ghci as it doesn't support unboxed tuples
test('integerGmpInternals', [reqlib('integer-gmp'), omit_ways('ghci')], compile_and_run, [''])
test('plusMinusInteger', [omit_ways('ghci')], compile_and_run, [''])
-test('integerConstantFolding', broken_without_gmp, run_command,
+test('integerConstantFolding', normal, run_command,
['$MAKE -s --no-print-directory integerConstantFolding'])
test('fromToInteger', [], run_command,
['$MAKE -s --no-print-directory fromToInteger'])