Made it a module.

Put it in any directory, run guile -L . and then import (goof) in that directory.
This commit is contained in:
Linus 2020-12-16 20:17:13 +01:00
parent 317b3e732b
commit 7ddb707bb7
5 changed files with 59 additions and 14 deletions

13
goof/helpers.scm Normal file
View file

@ -0,0 +1,13 @@
(define-module (goof helpers)
#:export (define-aux-syntax define-aux-syntaxes))
(define-syntax define-aux-syntax
(lambda (stx)
(syntax-case stx ()
((_ name)
#'(define-syntax name
(lambda (stx)
(syntax-violation 'name "Loop clause used outside of loop macro" stx)))))))
(define-syntax-rule (define-aux-syntaxes name ...)
(begin
(define-aux-syntax name) ...))