summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger/scripts/break016.script
blob: 2124e045bd636969f1ae5dba58dfa0a5c6948dad (plain)
1
2
3
4
5
6
7
8
9
10
11
-- conditional breakpoints
:l break016.hs
:break 1 7
-- this is one way to do conditional breakpoints.  It's a bit
-- horrible: the :undef will complain the first time it is used.
:def cond (\expr -> return (":undef __cond\n:def __cond (\\_ -> if "++expr++" then return \"\" else return \":cont\")\n:__cond"))
:set stop 0 :cond (i < 3)
-- this one continues:
f 4
-- this one stops:
f 1