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

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