summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger/scripts/print002.script
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/print002.script')
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print002.script12
1 files changed, 10 insertions, 2 deletions
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