Commit 3e047a4b authored by Simon Marlow's avatar Simon Marlow
Browse files

move break1 to scripts/break012

parent 83c62cbd
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
test('break001', expect_broken(1275), ghci_script, ['break001.script'])
A.hs:8:9:
Warning: Extracted ids: [a, b, c, d, i]
[a, forall a. a -> a, (), Integer -> Integer -> Integer, a]
Stopped at a breakpoint in A.hs:8. Local bindings in scope:
_result :: (), a :: a, b :: forall a. a -> a, c :: (),
d :: Integer -> Integer -> Integer, i :: a
A.hs:8:9-18> a :: GHC.Base.Unknown
A.hs:8:9-18> b :: a -> a
A.hs:8:9-18> c :: ()
A.hs:8:9-18> d :: Integer -> Integer -> Integer
A.hs:8:9-18> a = (_t1::a)
b = (_t2::a -> a)
c = ()
d = (_t3::Integer -> Integer -> Integer)
A.hs:8:9-18> Returning to normal execution...
()
......@@ -32,6 +32,7 @@ test('break008', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_scri
test('break009', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break009.script'])
test('break010', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break010.script'])
test('break011', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break011.script'])
test('break012', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['break012.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'])
......
import GHC.Base (breakpoint, breakpointCond)
g i = let a = i + 1
b = id
c = ()
d = (+)
in breakpoint ()
in (a,b,c,d)
-- Test polymorphic types in a breakpoint
:set -fno-debugging
:l A
g 5
:l break012
:st g 5 `seq` ()
:st
:t a
:t b
:t c
......
Stopped at break012.hs:(1,0)-(5,17)
_result :: (a1, a2 -> a2, (), a -> a -> a)
Stopped at break012.hs:5:9-17
_result :: (a1, a2 -> a2, (), a -> a -> a)
a :: a1
c :: ()
b :: a3 -> a3
d :: a -> a -> a
a :: a1
b :: a3 -> a3
c :: ()
d :: a -> a -> a
a = (_t1::a1)
b = <function>
c = (_t3::())
d = <function>
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