syndicate-rkt/syndicate/schema-compiler.rkt

16 lines
533 B
Racket

#lang racket/base
(provide schema-compiler-plugin)
(require racket/match)
(require preserves-schema/compiler)
(define (schema-compiler-plugin schema options)
(match-define (schema-compiler-options _name
lookup-module-path
paths) options)
(define ds-path (lookup-module-path '(dataspace-patterns)))
(if (equal? ds-path (schema-translation-paths-relative-output-path paths))
`(begin)
`(begin (require (prefix-in :pat: ,ds-path)))))