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.
But you might also just be able to avoid pseudo-parameters entirely, depending on how you're using them. Robby On Sun, Jan 13, 2013 at 8:14 AM, Răzvan Rotaru <razvan.rot...@gmail.com>wrote: > > Thanks, > > 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. > > 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. > > Coming to the first issue, the compilation error is caused by a change in > the contract api. Here's the code that fails: > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ; I had to copy this from collects/scheme/private/contract-guts.ss > ; because it isn't provided from scheme/contract. > (define (flat-proj ctc) > (let ([pred? ((flat-get ctc) ctc)]) > (λ (pos neg src-info orig-str) > (λ (val) > (if (pred? val) > val > (raise-contract-error > val > src-info > pos > orig-str > "expected <~a>, given: ~e" > ((name-get ctc) ctc) > val)))))) > > (define (pseudo-parameter/c c) > (let ([c (coerce-contract pseudo-parameter/c c)]) > (make-proj-contract > `(pseudo-parameter/c ,(contract-name c)) > (lambda (pos neg src-info name) > (let* ([c-proj (if (flat-contract? c) > (flat-proj c) > ((proj-get c) c))] > [pos-proj (c-proj pos neg src-info name)] > [neg-proj (c-proj neg pos src-info name)]) > (lambda (p) > (let ([getter (pseudo-parameter-getter p)] > [setter (pseudo-parameter-setter p)]) > (make-pseudo-parameter > (lambda () > (pos-proj (getter))) > (lambda (x) > (setter (neg-proj x)))))))) > pseudo-parameter?/first-order))) > ;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > 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. > > Does anybody know how to fix this code? > > Thanks, > Razvan > > On 12 January 2013 20:16, Asumu Takikawa <as...@ccs.neu.edu> wrote: > >> On 2013-01-09 14:49:34 +0200, Răzvan Rotaru wrote: >> > [2]http://planet.racket-lang.org/trac/ticket/385 >> > Is there a way to push the fix back into the repository (other than >> > emailing the owner)? >> >> I think the only way to upload new versions of a package onto PLaneT is >> to be the package owner. There are two options: you can e-mail the owner >> a patch or you can fork the package under a new name (this was done with >> ssax/sxml2 for example). >> >> Cheers, >> Asumu >> > > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > >
____________________ Racket Users list: http://lists.racket-lang.org/users