Permalink
Browse files

Still working on Redex to Lang.

  • Loading branch information...
dvanhorn committed Dec 11, 2012
1 parent 8c26e97 commit ec6d701c6935c002b6d2565b9ae553a59880ae4c
View
@@ -0,0 +1,20 @@
+#lang racket
+(provide (rename-out [pcf-top #%top-interaction]
+ [pcf-module #%module-begin]))
+(require (for-syntax syntax/parse))
+(require redex/reduction-semantics
+ pcf/source)
+(define-syntax (pcf-top stx)
+ (syntax-parse stx
+ [(_ e)
+ #'(#%top-interaction
+ (apply values
+ (apply-reduction-relation* -->v-source (term e))))]))
+
+(define-syntax (pcf-module stx)
+ (syntax-parse stx
+ [(_ e ...)
+ #'(#%module-begin
+ (apply values
+ (append (apply-reduction-relation* -->v-source (term e))
+ ...)))]))
@@ -0,0 +1,2 @@
+#lang s-exp syntax/module-reader
+pcf/source/lang
@@ -167,7 +167,6 @@ Contextual closure of @racket[v] over evaluation contexts.
0)
]
-
@subsection[#:tag "cpcf/redex"]{Model}
@defmodule[cpcf/redex]
@@ -0,0 +1,2 @@
+#lang setup/infotab
+(define scribblings '(("main.scrbl")))
Oops, something went wrong.

0 comments on commit ec6d701

Please sign in to comment.