In the program below, can someone explain the following debugger output to me?
After :continue, shouldn't I hit the f breakpoint two more times? Why do I only hit the f breakpoint once? Is this a problem in the debugger? thart...@ubuntu:~/haskell-learning/debugger>cat debugger.hs -- try this: -- ghci debugger.hs -- > :break f -- > :trace t -- > :history -- should show you that f was called from h t = h . g . f $ "hey!" t2 = h . g . f $ "heh!" t3 = h . g . f $ "wey!" f = ("f -- " ++) g = ("g -- " ++) h = ("h -- " ++) ts = do putStrLn $ t putStrLn $ t2 putStrLn $ t3 {- Problems using :continue in the ghci debugger? Can someone explain the following debugger output to me? After :continue, shouldn't I hit the f breakpoint two more times? Why do I only hit the f breakpoint once? Is this a problem in the debugger? thart...@ubuntu:~/haskell-learning/debugger>ghci debugger.hs GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Main ( debugger.hs, interpreted ) Ok, modules loaded: Main. *Main> :break f Breakpoint 0 activated at debugger.hs:12:4-15 *Main> ts h -- g -- Stopped at debugger.hs:12:4-15 _result :: [Char] -> [Char] = _ 11 12 f = ("f -- " ++) ^^^^^^^^^^^^ 13 g = ("g -- " ++) [debugger.hs:12:4-15] *Main> :continue f -- hey! h -- g -- f -- heh! h -- g -- f -- wey! *Main> -} _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe