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

Re: Swindle question & bug report



[Sorry for long reply time...]

First a comment: Swindle is not part of the stuff from Rice, so I
guess it wouldn't be too appropriate to discuss it on this list.  I
have a semi-list things for Swindle that up to now was only used by me
to say when I have new versions ready.


On Oct 30, Noel Welsh wrote:
> First, the question:
> 
> Can Swindle dispatch on MzScheme's structures?

No.  I thought about making that possible, but it's throwing work for
a rare situation - mixing Swindle stuff with MzScheme structures (and
objects).  So, currently there is nothing at all to support this.  I
have just added a little now - instead of getting <unknown-primitive>
as the class of MzScheme structures (which also was printed as <void>
by mistake), you get <mzscheme-struct>.  I also added
<mzscheme-object> and <mzscheme-interface>.  It is probably possible
to add more useful stuff but there should be a way to pull out
information about these structures (the inheritance hierarchy) or use
some wrapper macros - but again, I don't think that this is something
which would be too popular.


> The bug report:
> 
> In Swindle or DrSwindle
> 
> (require-library "prettyu.ss" "mzlib")
> 
> =>
> 
> letrec-values: illegal use of keyword at: :::dummy:::

Oh...  Well, the first thing is that there is no way to use mzlib
pretty-printer with Swindle - I have a printer implementation that
supports print-length and print-level as in Lisp, but no pretty
printing and no `circle' printing.  Implementing these would take some
time.

Another thing is that the error must be because of a hack I do in
Swindle - if I encounter a symbol that begins with a colon, I
immediately define it as a keyword with itself as its value.  For
example,

  (define :a 1)

gives a similar error.  Remember that DrSwindle is a hacked version of
DrScheme, there were way too many changes I needed to allow me to
implement it as a tool.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!