summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-06-24 17:22:17 +0200
committerAndy Wingo <wingo@pobox.com>2016-06-24 17:24:08 +0200
commitff5cafc77d34420b12a134ef2c1d5bd7ca4794cb (patch)
tree9f364d00d762b3ac6a41b3610797c5d450e51aaf
parent9687334ff52a2def369e7abb8563401351db9be7 (diff)
downloadguile-ff5cafc77d34420b12a134ef2c1d5bd7ca4794cb.tar.gz
Prevent (@ (ice-9 boot-9) x)
* module/ice-9/boot-9.scm: Prevent re-loading, perhaps via (@ (ice-9 boot-9) foo). (ice-9 boot-9) isn't a module. Fixes #21801.
-rw-r--r--module/ice-9/boot-9.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 5d1fcc4b3..c2ee108f6 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -39,6 +39,11 @@
(eval-when (compile)
(set-current-module (resolve-module '(guile))))
+;; Prevent this file being loaded more than once in a session. Just
+;; doesn't make sense!
+(if (current-module)
+ (error "re-loading ice-9/boot-9.scm not allowed"))
+
;;; {Language primitives}