sorry for spamming, here's actually what I really want to do (and maybe there's an easier solution than figuring out how define-type works)<div><br></div><div>I have:</div><div><br></div><div>(define-type shape ...)</div>
<div>(define (shape-draw shape) ...)</div><div><br></div><div>(define square (make-shape ...))</div><div>(define circle (make-shape ...))</div><div><br></div><div>Now, I want (square 'draw) to call (shape-draw square) and (circle 'draw) to call (shape-draw circle)</div>
<div><br></div><div>how do I make this link?</div><div><br></div><div>thanks!</div><div><br><div class="gmail_quote">On Tue, May 26, 2009 at 3:43 PM, lowly coder <span dir="ltr"><<a href="mailto:lowlycoder@huoyanjinjing.com">lowlycoder@huoyanjinjing.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">oh wait, this is in lib/_nonstd.scm, I guess this explains why documentation has been so hard to come by.<div><br></div>
<div>can anyone explain how:</div><div><br></div><div>(define-prim (##define-type-expand ...) ... in lib/_nostd.scm ) works ?</div>
<div><br></div><div>it seems like an _awful_ lot of code to setup a few macros ... so there must be something magical (optimizations) going on that I'm not aware of.</div><div><br></div><div>Thanks!<div><div></div><div class="h5">
<br><br><div class="gmail_quote">
On Tue, May 26, 2009 at 3:19 PM, lowly coder <span dir="ltr"><<a href="mailto:lowlycoder@huoyanjinjing.com" target="_blank">lowlycoder@huoyanjinjing.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hey,<div><br></div><div>  Where is define-type documented? I can't find it in r5rs or in the gambit documentation (though it is briefly mentioned in a tour of scheme through gambit). define-type is really cool and I'm starting to run against my limited knowledge of it.</div>


<div><br></div><div>Thanks!</div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>