Joey,
An early version of Cur did this (which worked well for an initial model, but
was terrible for performance and debugging).
I don't have anything written up, but you can try reading the code and pinging
me with questions:
https://github.com/wilbowma/cur/blob/9e575a8c220c0cf399ec3f90e6994
Deferring everything to runtime could avoid macros as much as
possible. You can implement input parsing as a function and use the
macro only to glue things together.
#lang racket/base
(require (for-syntax racket/base)
syntax/parse/define
redex/reduction-semantics)
(provide (ren
Thanks for the response!
That's not quite what I want. That will quote lambdas and applications into
my redex models, but I also want it to reduce them by my reduction relation.
The link I posted discussed how to do that, but only when you write
programs in the syntax of the model.
Sorry for n
I'm a novice too, but here's my attempt to help.
> I'd like to use (define-syntax) to make lambda, #%app, etc. all expand
> into terms in my model.
>
This works for me. Is this what you want?
#lang racket/base
(require redex)
(define-language L
(term ::=
(TermLambda var term)
4 matches
Mail list logo