<div dir="ltr"><div style>I think you want to use a new definition of pseudo-parameter/c that uses blame objects -- the code you quote is using old APIs in general. Check out section 7.7 in the Reference.</div><div style><br>
</div><div style>But you might also just be able to avoid pseudo-parameters entirely, depending on how you're using them.</div><div style><br></div><div><span style="font-family:monospace">Robby</span></div><div><span style="font-family:monospace"><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jan 13, 2013 at 8:14 AM, Răzvan Rotaru <span dir="ltr"><<a href="mailto:razvan.rotaru@gmail.com" target="_blank">razvan.rotaru@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra">Thanks,<br><br></div><div class="gmail_extra">I have found out that you can apply your patches to the cache (~/.racket/planet/300/5.2.1/cache/) and it works. This way you can at least apply the fixes on your local machine. I don't know if and when the cache files are refreshed with the version from planet (therefore overwriting my patches), but until now the solution looks feasible.<br>
<br></div><div class="gmail_extra">In my case the problem is I don't get any reply from the package owner (Dave Herman). Maybe the email address is not valid anymore.<br><br></div><div class="gmail_extra">Coming to the first issue, the compilation error is caused by a change in the contract api. Here's the code that fails:<br>
<br></div><div class="gmail_extra">;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br></div><div class="gmail_extra">; I had to copy this from collects/scheme/private/contract-guts.ss<br>; because it isn't provided from scheme/contract.<br>
(define (flat-proj ctc)<br> (let ([pred? ((flat-get ctc) ctc)])<br> (λ (pos neg src-info orig-str)<br> (λ (val)<br> (if (pred? val)<br> val<br> (raise-contract-error<br> val<br>
src-info<br> pos<br> orig-str<br> "expected <~a>, given: ~e"<br> ((name-get ctc) ctc)<br> val))))))<br><br>(define (pseudo-parameter/c c)<br>
(let ([c (coerce-contract pseudo-parameter/c c)])<br> (make-proj-contract<br> `(pseudo-parameter/c ,(contract-name c))<br> (lambda (pos neg src-info name)<br> (let* ([c-proj (if (flat-contract? c)<br> (flat-proj c)<br>
((proj-get c) c))]<br> [pos-proj (c-proj pos neg src-info name)]<br> [neg-proj (c-proj neg pos src-info name)])<br> (lambda (p)<br> (let ([getter (pseudo-parameter-getter p)]<br>
[setter (pseudo-parameter-setter p)])<br> (make-pseudo-parameter<br> (lambda ()<br> (pos-proj (getter)))<br> (lambda (x)<br> (setter (neg-proj x))))))))<br>
pseudo-parameter?/first-order)))<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br><br></div><div class="gmail_extra">flat-get and proj-get don't exist anymore. I tried to find their replacements, but I'm not familiar with the entire contract system, so I'm basically wandering in the dark. <br>
<br></div><div class="gmail_extra">Does anybody know how to fix this code?<br><br></div><div class="gmail_extra">Thanks,<br>Razvan<br></div><div class="im"><div class="gmail_extra"><br><div class="gmail_quote">On 12 January 2013 20:16, Asumu Takikawa <span dir="ltr"><<a href="mailto:asumu@ccs.neu.edu" target="_blank">asumu@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2013-01-09 14:49:34 +0200, Răzvan Rotaru wrote:<br>
> [2]<a href="http://planet.racket-lang.org/trac/ticket/385" target="_blank">http://planet.racket-lang.org/trac/ticket/385</a><br>
<div>> Is there a way to push the fix back into the repository (other than<br>
> emailing the owner)?<br>
<br>
</div>I think the only way to upload new versions of a package onto PLaneT is<br>
to be the package owner. There are two options: you can e-mail the owner<br>
a patch or you can fork the package under a new name (this was done with<br>
ssax/sxml2 for example).<br>
<br>
Cheers,<br>
Asumu<br>
</blockquote></div><br></div></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>