> Just more or less as an aside, at its origin in April (!) this thread
> didn't mention any debugger - the question was just how to build ghc
> so that a stack trace would come out. A real debugger is no replacement
> for that (because you have to be on hand and know how to repeat the problem
> t
On Fri, 2 Sep 2005 [EMAIL PROTECTED] wrote:
...
> I was trying to debug a smallish program where I was getting this exact error
> and the trick with profiling did "work" on my system, but I remember it being
> almost useless for me. What what did end up working for me was:
> myhead :: [a] -> Strin
Quoting Nils Anders Danielsson <[EMAIL PROTECTED]>:
> On Thu, 01 Sep 2005, Frederik Eaton <[EMAIL PROTECTED]> wrote:
>
> > But getting a stack backtrace when there is an error should be a
> > pretty basic feature. It's very hard to debug a large program when you
> > can randomly get messages like
Hello Nils,
Friday, September 02, 2005, 10:47:05 AM, you wrote:
NAD> Compile your program with -prof -auto-all (make sure you have the
NAD> I tried this out under GHC 6.4/Linux and got a segmentation fault
NAD> instead of a stack trace. Under GHC 6.2.2 it seemed to work, though.
this error
Hello Jacques,
Thursday, September 01, 2005, 6:55:43 PM, you wrote:
>>instance (Monad m, MyNum v) => MyNum (m v) where
>>(.+) = liftM2 (.+)
>>
>>
JC> Such simplified forms then occur often enough that, in a scrapping
JC> boilerplate kind of way, I would really like to be able to write
JC
On Fri, Sep 02, 2005 at 05:10:35PM +1000, Ben Lippmeier wrote:
>
> >>... It's very hard to debug a large program when you
> >>can randomly get messages like "*** Exception: Prelude.head: empty
> >>list" and have no idea where they came from.
> >
>
> As a purely pragmatic suggestion: don't use he
Nils Anders Danielsson <[EMAIL PROTECTED]> writes:
> My program is failing with head [], or an array bounds error, or some
> other random error, and I have no idea how to find the bug. Can you
> help?
>
> Compile your program with -prof -auto-all (make sure you have the
> profiling librari
... It's very hard to debug a large program when you
can randomly get messages like "*** Exception: Prelude.head: empty
list" and have no idea where they came from.
As a purely pragmatic suggestion: don't use head, fromJust, last, or any
other function that is likely to fail in impossible-