summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--haunt/reader.scm15
-rw-r--r--haunt/reader/skribe.scm15
-rw-r--r--haunt/ui.scm15
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)