[mercury-users] New User: Debug prints from Mercury? Printing "free" variables?

Ralph Becket rbeck at microsoft.com
Tue May 8 19:40:31 AEST 2001


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> Sent: 07 May 2001 14:09
> 
> Well, there is a way.  You can use unsafe_perform_io, which is defined
in the
> module `unsafe' in the trailed_update directory of the extras package.
> (The simplest way of installing this is to just copy unsafe.m into the
> same directory as the code you are trying to debug.)
> 
> [...]
> However, this approach is generally not recommended.

It's a tricky one.  There is definitely a gap between "printf" debugging
and
mdb and reengineering your code to do legitimate IO is painful.

> > Is there another good way of debugging.
> 
> Yes, use mdb.  See the Debugging chapter in the Mercury User's Guide.
> 
> If you have any feedback about mdb and/or its documentation,
> we'd like to hear it.

I strongly recommend using a recent release-of-the-day as I've checked
in
some extensions to the pretty printer that make the pretty format output
much more helpful, especially where lists, maps and tuples are
concerned.

Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list