[clean-list] making use of _print_graph

eli+@gs211.sp.cs.cmu.edu eli+@gs211.sp.cs.cmu.edu
Thu, 2 Nov 2000 19:34:58 -0500 (EST)


Hello, I'm new to this list and to Clean, and have a few questions
that arise from debugging my code.  I'd like to trace values without
writing great masses of toString code.  In last year's archives, John
van Groningen said that one could get access to the routine that
_system uses to print nullary Start, by the following voodoo:

write_graph :: !a -> Bool;
write_graph g = code  {
.d 1 0
        jsr     _print_graph
.o 0 0
        pushB TRUE
}

My clm (1.3, under Redhat 5.2 Linux) rejects this vehemently.  Can
anyone adjust that code to something it will like?  This could be
turned into a very convenient trace facility.

The other approach I've tried, using StdDebug trace functions, has
run into what I think is a basic question about type classes, which
for tidiness' sake I will ask in a separate letter.

-- 
     Eli Brandt  |  eli+@cs.cmu.edu  |  http://www.cs.cmu.edu/~eli/