On Tue, Jun 27, 2017 at 3:23 PM, 'William J. Bowman' via Racket Users <firstname.lastname@example.org> wrote: > (Unfortunately, there is a known bug in Redex that #...bind is undocumented, > so you had no way to know about this)
I agree that #:...bind is complex and the documentation is not ideal, but I believe you helped me improve it, so I'm not that known bug is really the most helpful reply here. Perhaps a pointer to the docs is better. Here it is: https://plt.eecs.northwestern.edu/snapshots/current/doc/redex/The_Redex_Reference.html#%28form._%28%28lib._redex%2Freduction-semantics..rkt%29._define-language%29%29 Meanwhile, Justin, I wasn't able to make your example work exactly the way you had it, but with an extra pair of parens around the `d`s thing seem fine. #lang racket (require redex/reduction-semantics) (define-language L (p ::= (prog (d ...) e)) (d ::= (defun (x x) e)) (e ::= x (e e) (+ e e) natural) (x ::= variable-not-otherwise-mentioned) #:binding-forms (defun (x_fun x_param) e #:refers-to x_param) #:exports x_fun (prog (d ...) #:refers-to (shadow d ...) e_main #:refers-to (shadow d ...))) (term (substitute (prog ((defun (f x) (g x)) (defun (g x) (f (+ x y)))) (+ (f 1) (g 2))) f 1) #:lang L) hth, Robby -- 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.