Hi Neil,
What seems very reasonable, however, would be a way for a module to
discover whether it is being loaded for use-syntax or use-module, so
that it can emit a warning, or even signal an error, if the use is
inappropriate.

Perhaps something like this...

 (define-module (ice-9 syncase)
   ...
   #:use-hook my-use-hook)

 (define (my-use-hook usage)
   (or (eq? usage #:use-syntax)
       (error "The (ice-9 syncase) module should always be used by
   calling (use-syntax ...), not (use-modules ...)")))

 ...

Does that sound reasonable?
Sounds great to me.
Regards,
Jon


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to