over
your shoulder while you do debugging or coding on your project.
I'm looking for people with at least a year's experience doing
functional programming, and who are currently working on a real
project (i.e. for some purpose other than learning functional
programming). I'm only a
output for all steps,
and in the order I would expect.
Are there other techniques that people use to get debugging output?
H
On 12/28/05, Robert Dockins <[EMAIL PROTECTED]> wrote:
>
> On Dec 28, 2005, at 6:10 AM, Hunter Kelly wrote:
>
> > Heya, I decided to play around with
On Dec 28, 2005, at 12:07 PM, Hunter Kelly wrote:
Yes, thank you, that did the trick! It produced the output for all
steps,
and in the order I would expect.
Are there other techniques that people use to get debugging output?
Well, if you are writing code in the IO monad, obviously you
there other techniques that people use to get debugging output?
>
> H
>
> On 12/28/05, Robert Dockins <[EMAIL PROTECTED]> wrote:
> >
> > On Dec 28, 2005, at 6:10 AM, Hunter Kelly wrote:
> >
> > > Heya, I decided to play around with Haskell and see what it
Yes, thank you, that did the trick! It produced the output for all steps,
and in the order I would expect.
Are there other techniques that people use to get debugging output?
H
On 12/28/05, Robert Dockins <[EMAIL PROTECTED]> wrote:
>
> On Dec 28, 2005, at 6:10 AM, Hunter
" and "dog" either fig -> fog ->
dog or
fig -> dig -> dog).
I came up with a solution, but I have to say it was quite difficult to
get any debugging information, and when I did, the result was fairly
surprising!
I see you are using Debug.Trace to generate your debug m
dog or
fig -> dig -> dog).
I came up with a solution, but I have to say it was quite difficult to
get any debugging information, and when I did, the result was fairly
surprising!
Here's the out put I got:
dagger:~/stuff$ ./figt /usr/share/dic/twords fig dog
Word: dog
visited:
antiquated. No trace, no symbolic debugging, no
> breakpoints.
Tracing/debugging in a lazy language is considerably different
from a standard debugger. Setting breakpoints and then evaluating
step-by-step is much less informative than you might imagine.
Nevertheless there are some tracing systems fo
pts and the
elegance of the language. At he same time, I'm quite disappointed about the
development environment that comes with GHCI and Hugs (the only systems
which I had a closer look at). Compared to PLT Scheme (not to mention
Smalltalk) this feels very antiquated. No trace, no symbolic debug
;. The nested 'trace' outputs will appear interspersed with
> each other. In recursive definitions this can become quite painful
> to disentangle.
trace is handy for quick debugging, but if you reach this point, HOOD
would probably b
> > Is there a list of problems anywhere with using trace? For
> > example does it affect evaluation order?
Apart from changing the evaluation order of expressions, trace has
other drawbacks, noted I think by Lennart(?) but I can't remember
exactly where. One issue is this:
Consider an express
> Manuel M T Chakravarty wrote:
>
> > There is `Debug.Trace.trace' for this:
> >
> > http://haskell.org/ghc/docs/latest/html/base/Debug.Trace.html
> >
> > However, if you want to log as opposed to debug, you may
> > want to have the output go to somewhere else but stdout.
> > Hence, it might
Manuel M T Chakravarty wrote:
There is `Debug.Trace.trace' for this:
http://haskell.org/ghc/docs/latest/html/base/Debug.Trace.html
However, if you want to log as opposed to debug, you may
want to have the output go to somewhere else but stdout.
Hence, it might be useful to have a variant of th
hello,
Ben Escoto wrote:
Maybe eventually I will see a need for mapWriter. As a passing
thought, I wonder how many programmers can read the mapWriterT
documentation:
mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b
and start pounding the code out? Anyway, once I get thi
Johannes Waldmann <[EMAIL PROTECTED]> writes:
> f x y = ( ... ) { info = parens $ fsep [ text "f", info x, info y ] }
Cool!
> that way you always know who built what.
> and it's cheap - if you don't use this information,
> then it's never created (due to laziness).
Uh..is that really true? I w
Ben Escoto wrote:
Hi all, does anyone have any tips on how to insert debugging or
logging statements through a program? Here are two possibilities:
another thing I found quite useful is
to add a component { .. , info :: Doc } to my data types,
and then set its value at each function call:
f x y
ke IO a. Then, running code that is unaware of
> logging requires a call to 'lift', and that's it.
Thanks for the pointer. I had seen Control.Monad.Writer in the ghc
docs but previously didn't know what is was good for. I will try to
learn how to use the various monad transf
Ben Escoto <[EMAIL PROTECTED]> wrote,
> Hi all, does anyone have any tips on how to insert debugging or
> logging statements through a program? Here are two possibilities:
[..]
> 2. Use unsafePerformIO or similar. But then your code is regularly
> defeating the
Ben Escoto writes:
> 1. Use some kind of logging monad.
This is definitely the way to go. The 'MonadWriter' class
provides a very general interface, which often proves to be
much more useful than just for logging. Especially, when you
use it to return data types with useful information --
rathe
Ben Escoto <[EMAIL PROTECTED]> writes:
> Hi all, does anyone have any tips on how to insert debugging or
> logging statements through a program?
> 1. Use some kind of logging monad.
> 2. Use unsafePerformIO or similar.
> It seems this must come up a lot when writing Ha
Hi all, does anyone have any tips on how to insert debugging or
logging statements through a program? Here are two possibilities:
1. Use some kind of logging monad. But then all your types become
more complicated and it seems you have to use lots of ->'s and
>>='s
I need to learn to use a debugging tool for haskell. There seems to be a whole
bunch of them (Hood, Freja, Hat, Buddha, ...). Can anyone give me a
(subjective) recommendation.
Thanks Per
___
Haskell mailing list
[EMAIL PROTECTED]
http
n Wed, 8 Jan 2003, Matthew Donadio wrote:
> Hi all,
>
> I am having a tough time debugging an array problem, and I was wondering
> if anyone had some pointers.
>
> I am working on a complicated function that relies on a few mutually
> recursive arrays (AR parameter estimation
Hi all,
I am having a tough time debugging an array problem, and I was wondering
if anyone had some pointers.
I am working on a complicated function that relies on a few mutually
recursive arrays (AR parameter estimation using Burg's Method). I am
getting a runtime error, index: Index o
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 ple
People,
I want to comment my last letter on the need of profiling.
The matter is that it helps to find errors in theoretical
estimations, to find the estimation "bugs".
Analyzing a complex program, the designer may assign the cost
estimations to its parts. For example,
cos
Hi Andrew,
| Hey all.. I was wondering if somebody might offer me some assistance in
| trying to debug some code I wrote to check whether a tree is a binary
| search tree.. For some reason it always comes back as false! :( Thanks
| much!
One of the great things about functional programming is t
Assuming this isn't a homework exercise...
> 1) If current node is empty then this portion of tree is a BST
> 2) if the left subtree and right subtree's are both not empty then ...
The logical negation of your second clause (which is what is picked
up by the 'otherwise' clause of your code) is
Mon, 17 Apr 2000 14:47:49 -0400 (EDT), Sitzman <[EMAIL PROTECTED]> pisze:
> > | otherwise = False
2
/ should be a BST too.
1
> >checkL = ((treeVal (leftSub thetree)) < (treeVal (thetree)))
> >checkR = ((treeVal (rightSub thetree)) > (treeVal (thetree)))
It's not enough:
3
Hey all.. I was wondering if somebody might offer me some assistance in
trying to debug some code I wrote to check whether a tree is a binary
search tree.. For some reason it always comes back as false! :( Thanks
much!
-Andrew Sitzer
> isBST :: Ord a => Tree a -> Bool
> isBST thetree
> | isNil
On 09-Dec-1999, Ralf Comtesse <[EMAIL PROTECTED]> wrote:
>
> I just try to use greencard from hugs98 on Linux. Is there any
> possibility to debug the shared library with my C code that runhugs
> includes. I use gcc and gdb for compiling and debugging.
>
> I tried to l
Hello,
I just try to use greencard from hugs98 on Linux. Is there any
possibility to debug the shared library with my C code that runhugs
includes. I use gcc and gdb for compiling and debugging.
I tried to load runhugs and the *.so files in gdb and set a breakpoint.
When runhugs is excecuted
[EMAIL PROTECTED] (S.D.Mechveliani) wrote,
> Mark Engelberg <[EMAIL PROTECTED]> wrote on 20 Sep 1999
>
>
> > How do you guys debug your Haskell programs? As far as I can tell, none of
> > the compilers support any sort of source debugging.
>
>
> Indee
>
> Indeed. In earlier GHC versions there was the Trace library with the
> `trace' function.
> Where it is now?
IOExts.hs has trace function. Your program has to import IOExts module.
When compiling using GHC, the option "-fglasgow-exts" must be given.
I hope that there will be some standard w
Mark Engelberg <[EMAIL PROTECTED]> wrote on 20 Sep 1999
> How do you guys debug your Haskell programs? As far as I can tell, none of
> the compilers support any sort of source debugging.
Indeed. In earlier GHC versions there was the Trace library with the
`trace' funct
--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mon Sep 20 1999, Mark Engelberg ->
> How do you guys debug your Haskell programs? As far as I can tell, none =
of
> the compilers support any sort of source debugging.
We
How do you guys debug your Haskell programs? As far as I can tell, none of
the compilers support any sort of source debugging.
--Mark Engelberg
[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
>
Hi,
from time to time one has to deal with run time errors of Haskel
programs without having a debugger at hand. The trace function helps a
little, but laziness restricts its usefulness. Right now, I'm chasing a
{_undefined_array_element} error. I tried a lot up to now and suspect in
the end th
t Mercury -- see <http://www.cs.mu.oz.au/mercury>.
Unfortunately there aren't any great debugging environments for Mercury
yet either... though we hope to be able to remedy that situation
sometime in the not-to-distant future.
--
Fergus Henderson <[EMAIL PROTECTED]> | "I hav
oblem with this work is that without significant support for
examining data (which as yet I have not seen in any similar debuggers
except mine for Goedel) debugging is still hard due to the size of
data manipulated in "real" programs.
There is also some work by Lee Naish et al. Check
http
ns involving functions "inside" your
program. Of course it's not the whole answer -- manufacturing the inputs
that break your function is sometimes the main problem -- but it helps.
In debugging GHC we don't use an interactive system. Rather, the compiler
is structured as a linea
After I have succesfully turned some of my colleagues from Prolog
hackers ):-( into Haskell lovers :-) , I'm now in a quite embarrasing
situation: Debugging features/environments are virtually nonexistant! So
we had to resort to inserting trace expressions (or should I say
"in
43 matches
Mail list logo