summaryrefslogtreecommitdiff
path: root/module/system/base/message.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/system/base/message.scm')
-rw-r--r--module/system/base/message.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/module/system/base/message.scm b/module/system/base/message.scm
index 21d06cc88..3cd862bd4 100644
--- a/module/system/base/message.scm
+++ b/module/system/base/message.scm
@@ -1,6 +1,6 @@
;;; User interface messages
-;; Copyright (C) 2009-2012,2016,2018,2020 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2012,2016,2018,2020-2021 Free Software Foundation, Inc.
;;; This library is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU Lesser General Public License as published by
@@ -127,6 +127,18 @@
(emit port "~A: warning: macro `~A' used before definition~%"
loc name)))
+ (use-before-definition
+ "report uses of top-levels before they are defined"
+ ,(lambda (port loc name)
+ (emit port "~A: warning: `~A' used before definition~%"
+ loc name)))
+
+ (non-idempotent-definition
+ "report names that can refer to imports on first load, but module definitions on second load"
+ ,(lambda (port loc name)
+ (emit port "~A: warning: non-idempotent binding for `~A'. When first loaded, value for `~A` comes from imported binding, but later module-local definition overrides it; any module reload would capture module-local binding rather than import.~%"
+ loc name name)))
+
(arity-mismatch
"report procedure arity mismatches (wrong number of arguments)"
,(lambda (port loc name certain?)