preserves/implementations/racket/preserves/preserves-schema/main.rkt

20 lines
740 B
Racket
Raw Normal View History

#lang racket/base
2021-06-02 04:56:44 +00:00
(provide (all-from-out "compiler.rkt"))
2021-06-02 04:56:44 +00:00
(require "compiler.rkt")
(module+ reader
(provide (rename-out [read-preserves-schema-module read-syntax]))
(require (only-in "reader.rkt" port->schema))
(define (read-preserves-schema-module src [p (current-input-port)])
(define-values (_dirname filename _must-be-dir) (split-path src))
(schema->module-stx
(string->symbol (path->string (path-replace-extension filename "")))
2021-05-26 21:27:55 +00:00
(lambda (module-path) #f)
(port->schema src p)
2021-06-02 04:56:44 +00:00
#:translation-paths (schema-translation-paths src
filename
#f
#f))))