thinking helps, but claiming that tools can't help doesn't.
Lets be absolutely clear about this: I've never claimed that
tools can't help. In this thread I've been using the term
debugger in the narrow sense implied by the OP's question --
something that steps through the execution of the
On Thu, Sep 07, 2006 at 06:21:01AM +0100, Jn Fairbairn wrote:
David Roundy [EMAIL PROTECTED] writes:
On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote:
Or maybe even more extreme you could use template haskell or the c
preprocessor to fill in the line number + column.
Tamas K Papp [EMAIL PROTECTED] writes:
I would like to learn a reasonable way (ie how others do it) to debug
programs in Haskell. Is it possible to see what's going on when a
function is evaluated? Eg in
f a b = let c = a+b
d = a*b
in c+d
evaluating
f 1 2
Hi
But why should c and d exist at runtime? They're only used
once each, so the compiler is free to replace f with
\a b - (a+b)+ a*b
Yes, and if the compiler is this clever, it should also be free to
replace them back at debug time.
I've said this before, but I think it's worth repeating:
I've also used Visual Studio, and I wouldn't mind having something
like that for Haskell. But I have to agree with Jon, I think the
best way of debugging is to understand your code. I think people who
come from imperative programming come with a mind set that you
understand your code by
On Wed, Sep 06, 2006 at 06:33:32AM -0400, Lennart Augustsson wrote:
I've also used Visual Studio, and I wouldn't mind having something
like that for Haskell. But I have to agree with Jon, I think the
best way of debugging is to understand your code. I think people who
come from
Tamas K Papp [EMAIL PROTECTED] writes:
Most of the mistakes I make are related to indentation,
I use Emacs, which has a reasonably decent mode for this. Hit TAB
repeatedly to show the possible indentations.
precedence (need to remember that function application binds
tightly).
It's not
Neil Mitchell [EMAIL PROTECTED] writes:
Hi
But why should c and d exist at runtime? They're only used
once each, so the compiler is free to replace f with
\a b - (a+b)+ a*b
Yes, and if the compiler is this clever, it should also be free to
replace them back at debug time.
And
Hi
Yes, and if the compiler is this clever, it should also be free to
replace them back at debug time.
And where does that get us? You snipped the salient bit
where I said that you'd be debugging a different programme.
In Visual C there are two compilation modes. In debug mode, if you
Tamas K Papp [EMAIL PROTECTED] writes:
On Wed, Sep 06, 2006 at 06:33:32AM -0400, Lennart Augustsson wrote:
I've also used Visual Studio, and I wouldn't mind having something
like that for Haskell. But I have to agree with Jon, I think the
best way of debugging is to understand your
On 06/09/2006, at 8:22 PM, Neil Mitchell wrote:It's been my experience that debugging is a serious weakness ofHaskell - where even the poor mans printf debugging changes thesemantics! And everyone comes up with arguments why there is no needto debug a functional language - that sounds more like
Neil Mitchell [EMAIL PROTECTED] writes:
Hi
Yes, and if the compiler is this clever, it should also be free to
replace them back at debug time.
And where does that get us? You snipped the salient bit
where I said that you'd be debugging a different programme.
In Visual C there
Hi
I think that when it comes to debuggers and Haskell its fairly safe to say:
1) There aren't any which are production quality, regularly work out
of the box and are avaiable without much effort. There may be ones
which are debuggers (Hat/GHCi breakpoints), but we probably haven't
got to the
I simply can't let this pass without comment. It's irrelevant if you're
using a functional or imperative language, debuggers are invariably
a waste of time. The only reason to use a debugger is because you need
to inspect the contents of a processes address-space;
That's a very narrow
On 06/09/2006, at 17:10, Andrae Muys wrote:On 06/09/2006, at 8:22 PM, Neil Mitchell wrote:It's been my experience that debugging is a serious weakness ofHaskell - where even the poor mans printf debugging changes thesemantics! And everyone comes up with arguments why there is no needto debug a
Andrae Muys [EMAIL PROTECTED] wrote:
It's a truism to say if your code doesn't work it's because you don't
understand it; ...
Indeed, but tracing the execution of the code, on the test example where
it fails, will often give insight into one's misunderstanding. And often,
the person trying
On 9/6/06, Neil Mitchell [EMAIL PROTECTED] wrote:
Let take for example a bug I spent tracking down in Haskell this
weekend. The bug can be summarized as Program error: pattern match
failure: head []. And indeed, thats all you get. A quick grep reveals
there are about 60 calls to head in the
Note: I meant to send this to the whole list a couple of messages ago
but accidentally I only sent it to Lennart, sorry Lennart!
I know that Linus Torvalds doesn't find debuggers all that useful
either and he hacks C [1].
1. http://linuxmafia.com/faq/Kernel/linus-im-a-bastard-speech.html
On
On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote:
Or maybe even more extreme you could use template haskell or the c
preprocessor to fill in the line number + column.
Which is precisely what darcs does for fromJust (which we use a lot):
we define a C preprocessor macro fromJust.
David Roundy wrote:
On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote:
Or maybe even more extreme you could use template haskell or the c
preprocessor to fill in the line number + column.
Which is precisely what darcs does for fromJust (which we use a lot):
we define a C
Hi
I don't know what your getout plan was but when I'm in this situation
I do the following (hopefully listing this trick will help the OP):
I have headNote, fromJustNote, fromJustDefault, lookupJust,
lookupJustNote, tailNote - a whole set of functions which take an
extra note parameter - or
On 2006-09-06, Andrae Muys [EMAIL PROTECTED] wrote:
Jon understates it by implying this is a Functional/Haskell specific
quality - it's not. Debuggers stopped being useful the day we
finally delegated pointer handling to the compiler/vm author and got
on with writing code that actually
scientists, who ought to know,
assure us that it must be so,
oh, let us never, never, doubt,
what nobody is sure about.
(or something like that..;-)
as everyone else in this thread, I have my own experiences and
firm opinions on the state of debugging support in Haskell (in
particular on the
Claus Reinke [EMAIL PROTECTED] writes:
thinking helps, but claiming that tools can't help doesn't.
Lets be absolutely clear about this: I've never claimed that
tools can't help. In this thread I've been using the term
debugger in the narrow sense implied by the OP's question --
something that
David Roundy [EMAIL PROTECTED] writes:
On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote:
Or maybe even more extreme you could use template haskell or the c
preprocessor to fill in the line number + column.
Which is precisely what darcs does for fromJust (which we use a lot):
25 matches
Mail list logo