diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-11-11 20:10:52 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-11-11 20:10:52 -0500 |
commit | e82384892823eda0a1ffb1e6b7cbd1f5172b53dc (patch) | |
tree | 1f72d944f67c5ff2725b2266771bff9b924e201b | |
parent | 9b302e929baf43900cd20b7b1db60583cc2b885c (diff) |
publisher: Throw an error if name isn't a symbol.
-rw-r--r-- | haunt/publisher.scm | 7 |
1 files changed, 6 insertions, 1 deletions
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 <publisher> - (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)) |