[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

changing display methods for structures, etc?



If I create a structure in MzScheme, e.g.,

(define-struct task (name priority))

And then display an instance:

(display (make-task 'my-task 100))

I get something like:

#<struct:task>

Is there a method for defining a print method (like Common Lisp's
PRINT-OBJECT) that would allow me print out the fields of the structure
as well as the 'unique id' of the structure? This would help greatly in
debugging.

For example:

#<struct:task 32323 :name my-task :priority 100>

--
Will