[Chicken-users] Creating new types and their representation in the REPL

2010-07-07 Thread Jack Trades
I'm sure this is a simple question but I can't quite figure it out. Is there a way to get (define-record ...) to print out something other than the tag of the record? Example of current behavior: (define-record point x y) (define p (make-point 5 10)) p ===> # Example of desired behavior: (def

Re: [Chicken-users] Creating new types and their representation in the REPL

2010-07-07 Thread Peter Bex
On Wed, Jul 07, 2010 at 01:45:39PM -0500, Jack Trades wrote: > I'm sure this is a simple question but I can't quite figure it out. Is > there a way to get (define-record ...) to print out something other than the > tag of the record? > > Example of current behavior: > > (define-record point x y)

Re: [Chicken-users] Creating new types and their representation in the REPL

2010-07-07 Thread John Cowan
2010/7/7 Jack Trades : > I'm sure this is a simple question but I can't quite figure it out.  Is > there a way to get (define-record ...) to print out something other than the > tag of the record? You want "define-record-printer", which is a macro taking two arguments, the name of the record and

Re: [Chicken-users] Creating new types and their representation in the REPL

2010-07-07 Thread Thomas Chust
2010/7/7 Jack Trades : > I'm sure this is a simple question but I can't quite figure it out.  Is > there a way to get (define-record ...) to print out something other than the > tag of the record? > [...] Hello Jack, I think you are looking for define-record-printer from CHICKEN's standard librar

Re: [Chicken-users] Creating new types and their representation in the REPL

2010-07-07 Thread Jack Trades
On Wed, Jul 7, 2010 at 1:58 PM, Peter Bex wrote: > > Use define-record-printer: > > http://chicken.wiki.br/man/4/Non-standard%20macros%20and%20special%20forms#define-record-printer > > Cheers, > Peter > > Thanks, I didn't know where the documentation for define-record was. That's one thing I lik

Re: [Chicken-users] Creating new types and their representation in the REPL

2010-07-07 Thread Jim Ursetto
Just FYI, If you go to chickadee and start typing define-record, you will see define-record-printer in the search box. On Jul 7, 2010, at 17:27, Jack Trades wrote: > > On Wed, Jul 7, 2010 at 1:58 PM, Peter Bex wrote: > > Use define-record-printer: > http://chicken.wiki.br/man/4/Non-standar

Re: [Chicken-users] Creating new types and their representation in the REPL

2010-07-09 Thread Alejandro Forero Cuervo
> Thanks, I didn't know where the documentation for define-record was. To get the documentation of some macro or procedure, call it , you may try to go to http://chicken.wiki.br/, which will often redirect you to the right page and location. In this case, you'd try: http://chicken.wiki.br/define