I believe I've pushed a fix for this. Thanks for the report!

Robby

On Tue, Oct 27, 2015 at 10:10 AM, William J. Bowman
<wilbo...@ccs.neu.edu> wrote:
> Recently after upgrading from Paul's fork, substitute stopped working
> inside my reduction relation. I get the following error:
>
>> compiled-lang-binding-table: contract violation
>>   expected: compiled-lang?
>>   given: #f
>>   context...:
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:1425:42
>>    
>> /home/bluephoenix47/workspace/racket/racket/collects/racket/private/map.rkt:21:13:
>>  map
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:1724:24:
>>  loop
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:840:15
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:973:9
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:1047:7
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:250:0:
>>  apply-reduction-relation/tagged
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:2464:2
>>    
>> /home/bluephoenix47/workspace/racket/extra-pkgs/redex/redex-lib/redex/private/reduction-semantics.rkt:2442:0:
>>  apply-reduction-relation*15
>>    
>> /home/bluephoenix47/workspace/racket/racket/collects/racket/contract/private/arrow-val-first.rkt:324:3
>
> I notice that substitute recently changed to a metafunction--which is
> handy--and requires (default-language) be set. According to the
> documentation, (default-language) is only set inside metafunction and
> judgment-forms, *not* reduction-relations. Perhaps this is the cause of
> the error?
>
> --
> William J. Bowman
>
> On Sat, Sep 19, 2015 at 12:21:17PM -0500, Robby Findler wrote:
>> Paul Stansifer has been implementing the ideas from his dissertation
>> work in Redex and is now ready to share them with the world.
>>
>> Thanks to Paul, Redex languages now understand binding structure,
>> meaning that if you write a substitution function that just blindly
>> substitutes, it will actually properly do alpha conversion to avoid
>> name collisions. In general, pattern matching now has alpha
>> equivalence smarts (see the docs for more).
>>
>> The new features include the #:binding keyword in define-language and
>> extend-language, and the alpha-equivalent? and substitute functions.
>>
>> The plan is to let it stay only in Paul's repo until the next release
>> goes out and then push it to the main Redex repo to be included in the
>> release after this one. If you'd like to give it a try, some
>> instructions are below. Please let us know how it goes!
>>
>> Robby
>>
>>
>> --------------------------------
>>
>> To try it out, first download a snapshot build:
>>
>>    http://pre.racket-lang.org/installers/
>>
>> and then create a parent directory to hold the git repo for Redex:
>>
>>   cd PLTDIR; mkdir extra-pkgs; cd extra-pkgs
>>
>> run this command to get the git version of Redex:
>>
>> raco pkg update --clone redex \
>>   "git://github.com/racket/redex?path=redex" \
>>   "git://github.com/racket/redex?path=redex-benchmark" \
>>   "git://github.com/racket/redex?path=redex-doc" \
>>   "git://github.com/racket/redex?path=redex-examples" \
>>   "git://github.com/racket/redex?path=redex-gui-lib" \
>>   "git://github.com/racket/redex?path=redex-lib" \
>>   "git://github.com/racket/redex?path=redex-pict-lib" \
>>   "git://github.com/racket/redex?path=redex-test"
>>
>> and then get Paul's version:
>>
>>   cd redex
>>   git remote add paul https://github.com/paulstansifer/redex-1.git
>>   git checkout public
>>   raco setup
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to