[plt-scheme] transition teaching languages - textual

From: ifconfig (nslookupifconfig at hotmail.com)
Date: Tue May 4 06:07:28 EDT 2004

You need to make the struct transparent. You do that by adding
(make-inspector):
(define-struct foo (bar baz) (make-inspector))
Now, choose the output syntax (in the language selection dialog box, click
show details). Write will not show the contents of structs, but quasiquote
style and constructor will. Current-print is to set the printer in code (I
think the default is write there). You should try out all three syntaxes,
and choose the one you like most. I like quasiquote, myself.

> -----Original Message-----
> From: plt-scheme-admin at list.cs.brown.edu [mailto:plt-scheme-
> admin at list.cs.brown.edu] On Behalf Of Markus Spath
> Sent: Tuesday, May 04, 2004 10:33 AM
> To: plt-scheme
> Subject: [plt-scheme] transition teaching languages - textual
> 
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> hi,
> 
> I just started leaving the save haven of drschemes student languages so
> I probably miss something obvious, but I can't find a way to make the
> display of structs as verbose as in the student languages - in the
> interactions window it just gives me a
> 
> textual: #<struct:foo>
> 
> compared to
> student: (make-foo bar baz ...)
> 
> is there a way to define this behaviour?
> 
> 
> thanks,
> Markus
> 
> 
> 



Posted on the users mailing list.