mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-08 13:37:35 +02:00
Adding warning to remind people to (import (scheme base)).
This commit is contained in:
parent
64931197a6
commit
95215e9228
1 changed files with 23 additions and 14 deletions
11
lib/meta.scm
11
lib/meta.scm
|
@ -167,6 +167,15 @@
|
||||||
(%import env (module-env mod2) (cdr mod2-name+imports) #t)))
|
(%import env (module-env mod2) (cdr mod2-name+imports) #t)))
|
||||||
(cdr x)))))
|
(cdr x)))))
|
||||||
meta)
|
meta)
|
||||||
|
(guard
|
||||||
|
(exn (else
|
||||||
|
(module-meta-data-set! mod meta)
|
||||||
|
(if (not (any (lambda (x)
|
||||||
|
(and (pair? x)
|
||||||
|
(memq (car x) '(import import-immutable))))
|
||||||
|
meta))
|
||||||
|
(warn "WARNING: exception inside module with no imports - did you forget to (import (scheme base)) in" name))
|
||||||
|
(raise-continuable exn)))
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(case (and (pair? x) (car x))
|
(case (and (pair? x) (car x))
|
||||||
|
@ -180,7 +189,7 @@
|
||||||
(for-each (lambda (expr) (eval expr env)) (cdr x)))
|
(for-each (lambda (expr) (eval expr env)) (cdr x)))
|
||||||
((error)
|
((error)
|
||||||
(apply error (cdr x)))))
|
(apply error (cdr x)))))
|
||||||
meta)
|
meta))
|
||||||
(module-meta-data-set! mod meta)
|
(module-meta-data-set! mod meta)
|
||||||
(warn-undefs env #f)
|
(warn-undefs env #f)
|
||||||
env))
|
env))
|
||||||
|
|
Loading…
Add table
Reference in a new issue