#lang scheme/base
(require
"../scat.ss"
"pattern-runtime.ss"
(for-syntax
scheme/base
"pattern-tx.ss"))
(provide
asm-pattern
with-patterns
patterns
pattern-lambda)
(define-syntax (patterns stx)
(syntax-case stx ()
((_ namespace . patterns)
(asm-transforms-tx #'namespace #'patterns))))
(define-syntax (with-patterns stx)
(syntax-case stx ()
((_ namespace . patterns)
(with-asm-transforms-tx #'namespace #'patterns))))
(define-syntax (pattern-lambda stx)
(syntax-case stx ()
((_ . patterns)
(asm-lambda-tx #'patterns))))
(define-syntax (asm-pattern stx)
(syntax-case stx ()
((_ . ins)
(asm-template-tx #'ins #'(printf "asm-pattern\n")))))