Consider the following racket program:

#lang racket
(require redex/reduction-semantics)
(define-language L
  [bar natural]
  [H (side-condition (name f any) (foo (term f)))])
(define-syntax-rule (foo i) (redex-match L bar i))

This expands just fine. However, try to abstract over L via a macro:

#lang racket
(require redex/reduction-semantics)
(define-syntax-rule (M lang)
  (define-syntax-rule (foo i) (redex-match lang bar i)))
(define-language L
  [bar natural]
  [H (side-condition (name f any) (foo (term f)))])
(M L)

I get the error that foo is undefined. Why?

-Ian
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to