How about this: 

#lang racket

(require redex)
(require (for-syntax syntax/parse))

(define-syntax (r-r/tick stx)
  (syntax-parse stx
    [(_ PL #:domain x ((~literal -->) lhs rhs) ...)
     #'(reduction-relation
        PL
        #:domain (x natural)
        (--> (lhs natural) (rhs ,(+ (term natural) 1))) ...)]))

(define (traces/t rr trm)
  (define new-term (term (,trm 0)))
  (displayln (redex-match X (e natural) new-term))
  (traces rr new-term))

; -----------------------------------------------------------------------------
        
(define-language X
  (e ::= a b c))

(define go
  (r-r/tick
   X
   #:domain e
   (--> a b)
   (--> b c)
   (--> c a)))

(traces/t go (term a))

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to