From 4bac243efed48d1d440795d67a9478b9eb82fb94 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 7 Feb 2012 16:14:09 -0600 Subject: [PATCH] put an expression to evaluate to find the path instead of the path that was there when the html file was built. closes PR 12545 (I do not agree with Eli's proposal for fixing this so I did it differently) --- collects/redex/private/tut.scrbl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/collects/redex/private/tut.scrbl b/collects/redex/private/tut.scrbl index 94f29270e9..4f40e678aa 100644 --- a/collects/redex/private/tut.scrbl +++ b/collects/redex/private/tut.scrbl @@ -22,7 +22,6 @@ slideshow/pict racket/pretty)) @(interaction-eval #:eval amb-eval (begin (pretty-print-columns 40) (random-seed 0))) -@(define-runtime-path tut-subst.rkt (list 'lib "tut-subst.rkt" "redex")) @(define orig-op (current-output-port)) @(define orig-ep (current-error-port)) @@ -539,12 +538,14 @@ To define a reduction relation, we also have to define substitution. Generally speaking, substitution functions are tricky to get right and, since they generally are not shown in papers, we have defined a workhorse substitution function in Racket that runs in near linear -time; the source code is here, if you'd like to have a look (with -test cases in the @filepath{test/tut-subst-test.rkt}, relative to -the directory below): +time; the source code is included with Redex, if you'd like to have a look; +evaluate the expression below in the REPL to find the precise path +on your system (test cases are in @filepath{test/tut-subst-test.rkt}, +relative to @filepath{tut-subst.rkt}): -@centered{@filepath{@(path->string tut-subst.rkt)}} +@centered{@racket[(collection-file-path "tut-subst.rkt" "redex")]} + That file defines the function @racket[subst/proc] that expects four arguments: a predicate for determining if an expression is a variable, a list of variables to replace, a list of terms to replace them with,