You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reporting your suggestions! I think it's great to support SRFI-138 as it is although Stak Scheme has several features to be implemented before that.
Stak Scheme currently doesn't support the define-library form in the direct Scheme interpreter but only in the compiler + bytecode interpreter mode as Stak Scheme is originally developed as more like a embedded scripting language. So that's one task to be done before the load path stuff.
Another thing is the include directive in your example which is relatively easy to implement in the direct interpreter as I can just read a file into S-expressions in the eval procedure.
I tried looking around the documentation and code but could not find a way to add directory to library load path.
Is there one?
Example:
snow/foo/bar.sld:
(define-library (foo bar) (import (scheme base) (scheme write)) (export (baz)) (include "bar.scm"))
snow/foo/bar.scm:
(define baz (lambda () (display "Hello world") (newline)))
main.scm:
(import (scheme base) (foo bar)) (baz)
I dont think the library naming directory structure link is in R7RS but most implementations support it.
If there is no flag for this may I suggest -I and -A from SRFI-138?
Then running code above would be something like this:
stak -I ./snow main.scm
The text was updated successfully, but these errors were encountered: