Re: [Haskell-cafe] Debugging Haskell code

2009-09-29 Thread Justin Bailey
On Sun, Sep 27, 2009 at 12:50 PM, Paul Moore p.f.mo...@gmail.com wrote: The problem is that I have *no idea* how to begin debugging this. In C, Python, or any other imperative language, I'd put traces in, etc. But in Haskell, I don't even know where to start. One of the standard modules is

Re: [Haskell-cafe] Debugging Haskell code

2009-09-29 Thread Dougal Stanton
On Sun, Sep 27, 2009 at 9:17 PM, Paul Moore p.f.mo...@gmail.com wrote: That's odd, it seems to be saying it's not installed at all! Hmm, no - I did a cabal install --user (because Vista doesn't let me do site-wide installs), looks like cabal list doesn't pick up user installs. Hmm, cabal

Re: [Haskell-cafe] Debugging Haskell code

2009-09-28 Thread John D. Ramsdell
On Sun, Sep 27, 2009 at 3:50 PM, Paul Moore p.f.mo...@gmail.com wrote: The problem is that I have *no idea* how to begin debugging this. I've had great success debugging a large program by loading the Main module into ghci after setting GHC extensions, changing the search path, and setting

Re: [Haskell-cafe] Debugging Haskell code

2009-09-28 Thread Curt Sampson
On 2009-09-28 22:53 -0400 (Mon), John D. Ramsdell wrote: I've had great success debugging a large program by loading the Main module into ghci after setting GHC extensions, changing the search path, and setting break on errors. If you then place calls to the error function at the right

[Haskell-cafe] Debugging Haskell code

2009-09-27 Thread Paul Moore
I'm still playing round with my random dieroll generation program. In doing so, I just hit a segmentation fault (I didn't think Haskell could *cause* a segfault!) I'm sure it's my code - I got this to compile by fiddling with types until the errors (which I didn't understand) went away. Certainly

Re: [Haskell-cafe] Debugging Haskell code

2009-09-27 Thread andy morris
2009/9/27 Paul Moore p.f.mo...@gmail.com: I'm still playing round with my random dieroll generation program. In doing so, I just hit a segmentation fault (I didn't think Haskell could *cause* a segfault!) I'm sure it's my code - I got this to compile by fiddling with types until the errors

Re: [Haskell-cafe] Debugging Haskell code

2009-09-27 Thread Paul Moore
2009/9/27 andy morris a...@adradh.org.uk: mersenne-random uses the FFI, so it's probably that. I just ran your code with mersenne-random-1.0 and didn't get a segfault. What version are you using? Not entirely sure, I just did a cabal install a short while back. cabal list mersenne Warning:

Re: [Haskell-cafe] Debugging Haskell code

2009-09-27 Thread Daniel Fischer
Am Sonntag 27 September 2009 22:02:45 schrieb andy morris: mersenne-random uses the FFI, so it's probably that. I just ran your code with mersenne-random-1.0 and didn't get a segfault. Yup, works here, too. And everything but mersenne-random should be fool-proof. What version are you using?

Re: Debugging haskell

2003-02-24 Thread D. Tweed
On Mon, 24 Feb 2003, Malcolm Wallace wrote: Joe English [EMAIL PROTECTED] writes: Me either; in fact even 1/4 of the time debugging sounds quite high. When I first started using Haskell, most of my time went to fighting with the typechecker, but once the code checked it almost

Re: Debugging haskell

2003-02-24 Thread Andrew Moran
Dave Tweed wrote: If you discard `compliation preventing, very very quick to solve' bugs (e.g., missing semi-colons in C++, silly typecheck errors in Haskell) I find that the ratio between source code bugs and algorithm bugs is maybe 1:5. This means that whilst I find Haskell a great deal

Re: Debugging haskell

2003-02-24 Thread Matt Hellige
the time I spend debugging Haskell and time spent debugging C++ because language independent bugs are the bottleneck. So in my case I couldn't justify using Haskell on the grounds of reduced debugging time. (I could justify it on lots of other grounds of course...) Well, I'd like to point out

Re: Debugging haskell

2003-02-23 Thread Ketil Z. Malde
Joe English [EMAIL PROTECTED] writes: Sengan Baring-Gould wrote: http://www.catb.org/~esr/writings/taoup/html/ch01s06.html states that debugging often occupies three-quarters or more of development time. I don't think that is my experience in Haskell... more like 1/4 at most. I was

Debugging haskell

2003-02-21 Thread Sengan . Baring-Gould
http://www.catb.org/~esr/writings/taoup/html/ch01s06.html states that debugging often occupies three-quarters or more of development time. I don't think that is my experience in Haskell... more like 1/4 at most. I was wondering what others felt. Sengan

Debugging Haskell: the stack

2002-10-25 Thread Christoph Lueth
Dear Haskell people, when I call from Haskell into C, stop it there, and use a debugger (e.g gdb) to look at the stack, it looks all broken. Here is an example: #0 c_init () at c.c:5 #1 0x08048f14 in ssM_fast1 () #2 0x0804a248 in sakt_ret () #3 0x04c58308 in ?? () (c_init is a C function

RE: Debugging Haskell: the stack

2002-10-25 Thread Simon Marlow
when I call from Haskell into C, stop it there, and use a debugger (e.g gdb) to look at the stack, it looks all broken. Here is an example: #0 c_init () at c.c:5 #1 0x08048f14 in ssM_fast1 () #2 0x0804a248 in sakt_ret () #3 0x04c58308 in ?? () (c_init is a C function on which

RE: Debugging Haskell

2002-03-13 Thread Simon Marlow
[ redirected to [EMAIL PROTECTED] ] Good day everyone, I was fiddling around with this tiny echo client/server haskell program from 'The Great Language Shootout' site (http://www.bagley.org/~doug/shootout/) and got stuck. The code (attached) has been reformatted with minimal API tweak

Debugging Haskell

2002-03-09 Thread Jerry, JiJie
Good day everyone, I was fiddling around with this tiny echo client/server haskell program from 'The Great Language Shootout' site (http://www.bagley.org/~doug/shootout/) and got stuck. The code (attached) has been reformatted with minimal API tweak (mkPortNumber, writeSocket, readSocket) to

Debugging Haskell

2002-03-09 Thread Jerry, JiJie
Good day everyone, I was fiddling around with this tiny echo client/server haskell program from 'The Great Language Shootout' site (http://www.bagley.org/~doug/shootout/) and got stuck. The code (attached) has been reformatted with minimal API tweak (mkPortNumber, writeSocket, readSocket) to

Re: Debugging Haskell run-time errors

1998-08-24 Thread Alastair Reid
[EMAIL PROTECTED] (Nils Ellmenreich) writes: it would be *very helpful* to have a better error message [than {_undefined_array_element}], stating at least the index of the undefined element and perhaps even the arrays name. I tried to enclose every array access with a trace call, but it

Re: Debugging Haskell

1996-07-13 Thread Fergus Henderson
Sven Panne wrote: After I have succesfully turned some of my colleagues from Prolog hackers ):-( into Haskell lovers :-) Incidentally, if your colleagues might be interested in a modern Haskell-like approach to logic programming (pure, strong types, etc.), they should check out Mercury --

Re: Debugging Haskell

1996-07-12 Thread Dominic Binks
On Fri, 12 Jul 1996, Simon L Peyton Jones wrote: | a feeling of frustration around here. So here is my question: | |How do people out there debug Haskell programs??? | | Please note that I am not talking about toy programs of a few dozen | lines. How do e.g. the people at Glasgow