summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger/scripts/print002.script
blob: 1e56254d9469b52059a0d78173973021b25f2c88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- printing of Showables

:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
let f = Just (1.2::Float)
f
:p f

-- With @ghc-bignum@, small integer literals get converted directly into
-- @IS 10#@. This optimization means that small integers are always already
-- evaluated in the output for @:p@.
let ten = 10 :: Integer
:f ten
let i = Just ten
:p i

case i of Just j -> Control.Exception.evaluate j
:p i

:l Test.hs

let s = S1 'a' 'b' 'c'
s
:p s
:sp s