Commit 4ab66c8e authored by Simon Marlow's avatar Simon Marlow
Browse files

add another test, and accept some output

parent bd170ed3
......@@ -24,6 +24,7 @@ test('break001', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_scri
test('break002', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break002.script'])
test('break003', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break003.script'])
test('break005', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break005.script'])
test('break006', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break006.script'])
test('dynbrk001', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['dynbrk001.script'])
test('dynbrk002', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['dynbrk002.script'])
......
Breakpoint 0 activated at ../Test2.hs:3:0-8
Breakpoint 1 activated at ../Test2.hs:5:0-6
Stopped at ../Test2.hs:3:0-8
_result :: t
Stopped at ../Test2.hs:3:6-8
x :: GHC.Base.Unknown
_result :: t
x :: t
Stopped at ../Test2.hs:5:0-6
_result :: t
Stopped at ../Test2.hs:5:6
y :: GHC.Base.Unknown
it :: Integer
y :: GHC.Base.Unknown
This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type
_result :: t
y :: t
_result :: t
y :: t
y = (_t1::a)
()
y = 1
......
......@@ -3,7 +3,6 @@ Stopped at ../QSort.hs:(4,0)-(6,54)
_result :: [a]
Stopped at ../QSort.hs:5:15-50
_result :: [a]
as :: [a]
a :: a
left :: [a]
right :: [a]
:l ../Test3.hs
:st mymap (+1) [1,2,3]
:st
:show bindings
f x -- should fail, unknown return type
let y = f x
y
:p y
:force y
:show bindings
-- we know the result is Integer now
f x
-- should work now
Breakpoint 0 activated at ../QSort.hs:(4,0)-(6,54)
Stopped at ../QSort.hs:(4,0)-(6,54)
_result :: [a]
as :: [a]
a :: a
left :: [a]
right :: [a]
Breakpoint 0 activated at ../QSort.hs:5:15-50
Stopped at ../QSort.hs:5:15-50
as :: [GHC.Base.Unknown]
a :: GHC.Base.Unknown
left :: [GHC.Base.Unknown]
right :: [GHC.Base.Unknown]
_result :: [a]
a :: a
left :: [a]
right :: [a]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment