Re: [Haskell-cafe] :Trace has no history

2010-09-01 Thread Pepe Iborra
The debugger only instruments interpreted code, so evaluations occurring inside library code do not show up in :trace. This is not a terrible problem in practice, since usually seeing the evaluations occurring in your code is what you need to debug the problem. But since :trace is not showing you

Re: [Haskell-cafe] :Trace has no history

2010-08-31 Thread Steve Severance
How do I tell? Does this mean that if the exception is occurring in a haskell library I can't get to it? I am trying to run down a Prelude.read: No Parse error and I need to see the value that it is failing to parse on. Thanks. Steve On Tue, Aug 31, 2010 at 11:05 AM, Pepe Iborra wrote: > Hi Ste

Re: [Haskell-cafe] :Trace has no history

2010-08-31 Thread Pepe Iborra
Hi Steve The debugger only traces calls in interpreted code. Perhaps the call to myMethod is being made from object code? Admittedly, the ghci debugger can take some effort to learn to use properly. Make sure that you give a look to the ghc user guide if you haven't done so yet. Best, pepe On

[Haskell-cafe] :Trace has no history

2010-08-31 Thread Steve
I am trying to debug a problem in GHCI. I invoke my method with trace but when it breaks on exception i can't get this history. Output is below. Thanks. relude Symbols> :set -fbreak-on-exception Prelude Symbols> :trace myMethod Loading package HUnit-1.2.2.1 ... linking ... done. Loading package s

Re: [Haskell-cafe] Trace

2010-03-19 Thread Thomas DuBuisson
> Hi, > I'm a new Haskell programmer and am trying to output the values of some of > the variables (for debugging) as the program executes. Debugging? Use the GHCi debugger. Cheers, Thomas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://w

Re: [Haskell-cafe] Trace

2010-03-19 Thread Brent Yorgey
On Fri, Mar 19, 2010 at 04:03:52PM -0400, Ben Derrett wrote: > > trace2 a = trace (show a) a > > In the definition of `trace2': trace2 a = (show a) a These don't match. It looks like maybe you forgot the call to trace in your definition of trace2? -Brent ___

[Haskell-cafe] Trace

2010-03-19 Thread Ben Derrett
Hi, I'm a new Haskell programmer and am trying to output the values of some of the variables (for debugging) as the program executes. At the moment to output the value of the function I use: f x y z = trace (show moves) moves where moves = [complicated expression of x y z] But really what I wa

Re: [Haskell-cafe] trace

2009-12-24 Thread Daniel Fischer
Am Donnerstag 24 Dezember 2009 22:21:50 schrieb michael rice: > Hmm... here are the functions I was looking to trace, the second one being > an example from Scheme text "Concrete Abstractions" that I rewrote after > seeing the first. Compared to the CL/Scheme memoization code, the Haskell > seems l

Re: [Haskell-cafe] trace

2009-12-24 Thread michael rice
1    walk_count n = memo_walk_count (n-2) + memo_walk_count (n-1)    in (map walk_count [0..] !!)   --- On Thu, 12/24/09, Daniel Fischer wrote: From: Daniel Fischer Subject: Re: [Haskell-cafe] trace To: haskell-cafe@haskell.org Cc: "michael rice" Date: Thursday, December 24, 20

Re: [Haskell-cafe] trace

2009-12-24 Thread Daniel Fischer
Am Donnerstag 24 Dezember 2009 21:31:34 schrieb michael rice: > Can someone provide a simple example of tracing a function. > > Michael Is import Debug.Trace infixl 0 `debug` debug = flip trace dfib :: Int -> Integer dfib = let fib 0 = 0 fib 1 = 1 fib n = dfib (n-2) + dfib

[Haskell-cafe] trace

2009-12-24 Thread michael rice
Can someone provide a simple example of tracing a function. Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] trace function

2006-07-20 Thread Malcolm Wallace
Alexander Vodomerov <[EMAIL PROTECTED]> wrote: > main = do > putStrLn "xxx" > return (trace "yyy" ()) > putStrLn "zzz" > > only xxx and zzz is displayed. yyy is missing. This is because you never demanded the value of (trace "yyy" ()), so it was never computed. The joys of laziness! To f

Re: [Haskell-cafe] trace function

2006-07-20 Thread Neil Mitchell
Hi, Either one of these will work: main = do putStrLn "xxx" x <- return (trace "yyy" ()) x `seq` putStrLn "zzz" main = do putStrLn "xxx" trace "yyy" (return ()) putStrLn "zzz" This works fine, the problem is that trace is defined to output the first parameter before returning the second. In t

[Haskell-cafe] trace function

2006-07-20 Thread tpledger
Alexander Vodomerov wrote: > import Debug.Trace > > main = do > putStrLn "xxx" > return (trace "yyy" ()) > putStrLn "zzz" > > only xxx and zzz is displayed. yyy is missing. > Why trace is not working? Nothing uses the value of (trace "yyy" ()), so it is never evaluated. Try this instead, wh

[Haskell-cafe] trace function

2006-07-20 Thread Alexander Vodomerov
Hello! The function trace is supposed to write debug messages to console. However, when I trying to run the following program import Debug.Trace main = do putStrLn "xxx" return (trace "yyy" ()) putStrLn "zzz" only xxx and zzz is displayed. yyy is missing. Why trace is not working? PS.

Re: [Haskell-cafe] Trace parser

2006-07-10 Thread Andy Georges
Hi Lemmih, Have you tried profiling the code? You can find a guide to profiling with GHC here: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html I did that ... it shows that updateState is retaining most data (-hr switch), as well as updateMap, which is increasing it's

Re: [Haskell-cafe] Trace parser

2006-07-07 Thread Lemmih
On 7/6/06, Andy Georges <[EMAIL PROTECTED]> wrote: Hello, I'm looking for a bit of help (ok, a lot) the speed up my program which I use to build a calltree out of an annotated program execution trace. To give you an idea about the sluggishness at the moment, for a trace containing 70MB, it has b

[Haskell-cafe] Trace parser

2006-07-06 Thread Andy Georges
Hello, I'm looking for a bit of help (ok, a lot) the speed up my program which I use to build a calltree out of an annotated program execution trace. To give you an idea about the sluggishness at the moment, for a trace containing 70MB, it has been running for about 10 hours straight (AMD