From e82384892823eda0a1ffb1e6b7cbd1f5172b53dc Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 11 Nov 2023 20:10:52 -0500 Subject: publisher: Throw an error if name isn't a symbol. --- haunt/publisher.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/haunt/publisher.scm b/haunt/publisher.scm index f3a8d4d..b9dcf38 100644 --- a/haunt/publisher.scm +++ b/haunt/publisher.scm @@ -35,11 +35,16 @@ (define %default-publisher-name 'production) (define-record-type - (make-publisher name proc) + (%make-publisher name proc) publisher? (name publisher-name) (proc publisher-proc)) +(define (make-publisher name proc) + (unless (symbol? name) + (error "expected symbol for publisher name" name)) + (%make-publisher name proc)) + (define (publish publisher site) ((publisher-proc publisher) site)) -- cgit v1.2.3