[plt-scheme] (typeof obj)

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Jun 11 11:17:49 EDT 2007

In addition to this, if you are really just concerned with debugging,
then probably you just want to print the values out.

But if you want more sophisticated things like Carl's package, also
check out match and copy-struct. They also work with the compile-time
information provided by define-struct.


On 6/11/07, Carl Eastlund <cce at ccs.neu.edu> wrote:
> On 6/11/07, Robert Nikander <nikander at nc.rr.com> wrote:
> >
> > On Jun 11, 2007, at 10:13 AM, Robby Findler wrote:
> > >
> > > Structs are the way to add new types to mzscheme :)
> >
> > Ah, I get it...  I was assuming that C-level extensions could define
> > new "primitive" non-struct types.  So if there is a small list of
> > type predicates that covers all possible values, I guess `run-time-
> > type' is not necessary like in some other languages.
> >
> > But I then have the same question about structs -- how do I get the
> > struct type info from a struct value.  But for that, I have yet to
> > consult the help desk...
> Some combination of the information provided by struct-info and
> struct-type-info is probably what you are looking for.  For an example
> of how to use them, you could look at the "equiv.plt" package in
> PLaneT, which I wrote to perform automatic structural comparison of
> structs.
> --
> Carl Eastlund
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.