diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-01-13 09:27:02 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2022-01-13 09:27:02 -0500 |
commit | 9795c647a864ddfaed85dfd4bb893879c62c34e5 (patch) | |
tree | 9f896c4ac7bb20b21f5a81c322a15d017cf8cdfa | |
parent | 708cd91d1f4714a635ed0312c4a89e083aec4a2d (diff) |
Fix Guile < 3.0 compatibility issue.
-rw-r--r-- | haunt/reader.scm | 15 | ||||
-rw-r--r-- | haunt/reader/skribe.scm | 15 | ||||
-rw-r--r-- | haunt/ui.scm | 15 |
3 files changed, 39 insertions, 6 deletions
diff --git a/haunt/reader.scm b/haunt/reader.scm index 028b996..cc9ed67 100644 --- a/haunt/reader.scm +++ b/haunt/reader.scm @@ -22,8 +22,19 @@ ;; ;;; Code: -(define-module (haunt reader) - #:declarative? #f +;; Hack to mark this module as non-declarative on Guile 3+ (which +;; would otherwise print a warning) but not break when compiling on +;; earlier versions of Guile. +(define-syntax-rule (define-module* name args ...) + (cond-expand + (guile-3 + (define-module name + #:declarative? #f + args ...)) + (guile + (define-module name args ...)))) + +(define-module* (haunt reader) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-11) diff --git a/haunt/reader/skribe.scm b/haunt/reader/skribe.scm index 7ffa3cf..c02d54c 100644 --- a/haunt/reader/skribe.scm +++ b/haunt/reader/skribe.scm @@ -22,8 +22,19 @@ ;; ;;; Code: -(define-module (haunt reader skribe) - #:declarative? #f +;; Hack to mark this module as non-declarative on Guile 3+ (which +;; would otherwise print a warning) but not break when compiling on +;; earlier versions of Guile. +(define-syntax-rule (define-module* name args ...) + (cond-expand + (guile-3 + (define-module name + #:declarative? #f + args ...)) + (guile + (define-module name args ...)))) + +(define-module* (haunt reader skribe) #:use-module (haunt reader) #:use-module (haunt skribe) #:use-module (haunt skribe utils) diff --git a/haunt/ui.scm b/haunt/ui.scm index 8c7c549..5af4ee3 100644 --- a/haunt/ui.scm +++ b/haunt/ui.scm @@ -22,8 +22,19 @@ ;; ;;; Code: -(define-module (haunt ui) - #:declarative? #f +;; Hack to mark this module as non-declarative on Guile 3+ (which +;; would otherwise print a warning) but not break when compiling on +;; earlier versions of Guile. +(define-syntax-rule (define-module* name args ...) + (cond-expand + (guile-3 + (define-module name + #:declarative? #f + args ...)) + (guile + (define-module name args ...)))) + +(define-module* (haunt ui) #:use-module (ice-9 format) #:use-module (ice-9 ftw) #:use-module (ice-9 match) |