From 702e881289eeb8c9f77a584ffb7b1e690b22ec8e Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Fri, 20 Sep 2024 09:13:16 +0900 Subject: [PATCH] Add error advise when forgetting to import a language. Closes #1001. --- lib/chibi/repl.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/chibi/repl.scm b/lib/chibi/repl.scm index fad9b498d..5c2d5e731 100644 --- a/lib/chibi/repl.scm +++ b/lib/chibi/repl.scm @@ -296,6 +296,8 @@ (pair? (exception-irritants exn))) (let ((name (car (exception-irritants exn)))) (cond + ((and (identifier? name) (not (env-parent (current-environment)))) + (display "Did you forget to import a language? e.g. (import (scheme base))\n" out)) ((identifier? name) (display "Searching for modules exporting " out) (display name out)