[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #1326: load then import of module inside eval fails t
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #1326: load then import of module inside eval fails to find module |
Date: |
Sat, 03 Sep 2016 21:46:29 -0000 |
#1326: load then import of module inside eval fails to find module
---------------------+--------------------------------
Reporter: caolan | Owner:
Type: defect | Status: new
Priority: major | Milestone: someday
Component: unknown | Version: 4.11.0
Keywords: | Estimated difficulty:
---------------------+--------------------------------
test-module.scm
{{{
(module test-module *
(import chicken scheme)
(define (hello name)
(string-append "Hello, " name)))
}}}
In csi:
{{{
#;1> (eval '(begin (load "test-module.scm") (import test-module) (hello
"world")))
Error: (import) during expansion of (import ...) - cannot import from
undefined module: test-module
Call history:
<syntax> (eval (quote (begin (load "test-module.scm")
(import test-module) (hello "world"))))
<syntax> (quote (begin (load "test-module.scm") (import
test-module) (hello "world")))
<syntax> (##core#quote (begin (load "test-module.scm")
(import test-module) (hello "world")))
<eval> (eval (quote (begin (load "test-module.scm") (import
test-module) (hello "world"))))
<syntax> (begin (load "test-module.scm") (import test-
module) (hello "world"))
<syntax> (##core#begin (load "test-module.scm") (import
test-module) (hello "world"))
<syntax> (load "test-module.scm")
<syntax> (import test-module) <--
}}}
This code works if I enter it directly into csi without the eval.
Interestingly, it also works if I split the eval into two steps:
{{{
#;1> (eval '(begin (load "test-module.scm")))
; loading test-module.scm ...
; loading /usr/lib/chicken/8/chicken.import.so ...
#;2> (eval '(begin (import test-module) (hello "world")))
"Hello, world"
--
Ticket URL: <https://bugs.call-cc.org/ticket/1326>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-janitors] #1326: load then import of module inside eval fails to find module,
Chicken Trac <=