Commit 50efef93 authored by Simon Marlow's avatar Simon Marlow
Browse files

move the break* tests into scripts/, and update as necessary

parent 3e047a4b
import GHC.Base (breakpoint)
import Control.Exception
f :: IO Bool
f = handle (\_->return False) (breakpoint$ return True)
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
test('break010', normal, ghci_script, ['break010.script'])
-- Check that coalescing of 'auto' breakpoints does not interfere with user breakpoints
:set -fno-debugging
:l A
f
:q
-- are we out of ghci yet ?
it
\ No newline at end of file
Stopped at a breakpoint in A.hs:5. Local bindings in scope:
_result :: IO Bool
A.hs:5:31-40> Returning to normal execution...
\ No newline at end of file
import GHC.Base (breakpoint, breakpointCond)
g :: Int -> ()
g i = ()
where a = False
b = True
c = breakpoint ()
\ No newline at end of file
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
test('break002', normal, ghci_script, ['break002.script'])
import GHC.Base (breakpoint, breakpointCond)
g :: Int -> ()
g i = let a = False
b = True
c = breakpoint ()
in ()
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
test('break003', normal, ghci_script, ['break003.script'])
-- Available bindings at let(s)
:set -fno-debugging
:l A
import GHC.Base (breakpoint, breakpointCond)
f i = breakpoint$ if ?flag then i*2 else i
g i = let ?flag=False in f i
\ No newline at end of file
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
test('break004', expect_broken(1275), ghci_script, ['break004.script'])
import GHC.Base (breakpoint, breakpointCond)
f i = breakpointCond (i>3) ()
g :: Int -> ()
g i = breakpoint ()
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