haskell-cafe | 23 May 22:15 2013
Picon

How not to force ghci debugger but still know the _result?

Hi,

As the subject says, I'd like to use the GHCI debugger to inspect the results
of some functions. I tried to set ":break"-points on these functions and
":step" through them, but unless I use ":force" I never get to see the result
of these functions.

Is it possible to somehow break when the result is evaluated?

Please find below a log of my attempts to debug a small example, where during
debugging none of the "_result" values is ever known/shown.

Maarten Faddegon

--

$ cat bla1.hs
blabla    :: [Int] -> Int
bla       :: Int -> Int
papperlap :: Int -> Int -> Int

bla x         = x+x
papperlap y x = ((y *) . bla) x
blabla xs     = foldl papperlap 0 xs
$ ghci bla1.hs
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main             ( bla1.hs, interpreted )
(Continue reading)


Gmane