[plt-scheme] Errors from Snooze Quick Start

From: Dave Gurnell (d.j.gurnell at gmail.com)
Date: Tue Jan 6 17:59:35 EST 2009

> I just tried to follow the Quick Start at
>
> http://planet.plt-scheme.org/package-source/untyped/snooze.plt/2/4/planet-docs/snooze/quick.html
>
> When I try to run "mzscheme test.ss", I get the error:
>
> test.ss:41:18: person: identifier for static struct-type information
> cannot be used as an expression in: person
>
>    Henk

Damn - sorry - that's a typo. You want "entity:person" in that case  
rather than "person".

define-persistent-struct binds "person" to the same sort of thing  
"define-struct" creates - its expansion-time value contains useful  
information but it's basically useless at run time. define-persistent- 
struct also binds "entity:person" to a struct containing metadata to  
use at run time. All the macros in Snooze use "person" and the  
procedures use "entity:person". For example you have:

   (define-alias p person)

but you have:

   (create-table entity:person)

It's ugly but when I wrote the code I didn't know how to do it any  
other way (suggestions for improvement would be much appreciated).

Anyway the docs are clearly wrong, which is my bad. I'll run through  
the quick start and correct it and post to this thread when I'm done.  
Feel free to contact me off-list if you need specific advice.

Cheers,

-- Dave



Posted on the users mailing list.