~williewillus/r16

ref: 94ad840462ec3ff26c487db60cf5cfeda7668253 r16/trick.rkt -rw-r--r-- 561 bytes
94ad8404Vincent Lee Remove note that trick local storage is transient 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#lang racket

;; #lang r16/trick <trick>

(module reader racket
  (provide (rename-out [read-syntax-trick read-syntax]
                       [read-trick read]))
  (define (read-trick [in (current-input-port)])
    (syntax->datum (read-syntax-trick 'program in)))
  (define (read-syntax-trick src in)
    (define trick (read in))
    (define string-args (string-trim (port->string in)))
    #`(module trick-module '#%kernel
        (#%provide r16-main)
        (define-values (r16-main)
          (lambda ()
            (call-trick '#,trick #,string-args))))))