<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Vincent, Carl,<br><br>I stumbled on another workaround, defining the specific methods outside of define-generics, and then rebinding them withing #:defaults.<br>Anyway, it was only for a small exercise.<br><br>Thanks for the quick reply,<br><br>Bert<br><br><div><hr id="stopSpelling">From: cce@ccs.neu.edu<br>Date: Wed, 10 Jul 2013 13:32:50 -0400<br>Subject: Re: [racket] define-generics #:defaults<br>To: bedeke@hotmail.com<br>CC: users@racket-lang.org<br><br><div dir="ltr"><div>Bert,<br><br></div>I've just pushed a fix to this bug, which I had written previously as part of some other work I'm doing with generics. As Vincent already pointed out, if you're using a released version of Racket and updating to the new code is problematic, you can always work around the bug with your own wrapper functions.<br>
<div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">Thanks for the report,<br clear="all"></div><div class="ecxgmail_extra"><div>Carl Eastlund</div>
<br><div class="ecxgmail_quote">On Wed, Jul 10, 2013 at 5:03 AM, Bert De Ketelaere <span dir="ltr"><<a href="mailto:bedeke@hotmail.com" target="_blank">bedeke@hotmail.com</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Helo,<br><br>in the documentation it is mentioned that the syntax for define-generics #:defaults is the same as for struct #:methods:<br><a href="http://docs.racket-lang.org/reference/struct-generics.html#%28form._%28%28lib._racket/generic..rkt%29._define-generics%29%29" target="_blank">http://docs.racket-lang.org/reference/struct-generics.html#%28form._%28%28lib._racket%2Fgeneric..rkt%29._define-generics%29%29</a><br>
and #:methods specifies that define/generic can be used to bind the generic method:<br><a href="http://docs.racket-lang.org/reference/define-struct.html#%28form._%28%28lib._racket/private/base..rkt%29._struct%29%29" target="_blank">http://docs.racket-lang.org/reference/define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29</a><br>
<br>but unfortunately using define/generic in #:defaults is a syntax error.<br>Is it possible to access the generic method from inside #:defaults definitions?<br><br>Groeten,<br>Bert<br>                                            </div></div>
<br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div></div></div>                                            </div></body>
</html>