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

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?