【问题标题】:Importing SRFIs in a Chicken Scheme module在鸡计划模块中导入 SRFI
【发布时间】:2017-12-29 07:28:13
【问题描述】:

我想知道为什么这不起作用:

(module testModule (sayHello)
  (import chicken scheme)

  (define (sayHello)
    (format #t "Hello\n")))

当我使用csi 启动这个文件时,它会说:

警告:对可能未绑定的标识符“格式”的引用:

here 被写入srfi-28format 所在的位置)是内置的。确实,如果我试试这个...

(module testModule (sayHello)
  (import chicken scheme)
  (use srfi-28)

  (define (sayHello)
    (format #t "Hello\n")))

...它说:

错误:(import)在扩展(import ...)期间 - 无法从未定义的模块导入:srfi-28

为什么?如何创建使用SRFI 28 的模块?

我也尝试通过chicken-install 安装 srfi-28,但正确的是,egg 不存在。

【问题讨论】:

    标签: module chicken-scheme srfi


    【解决方案1】:

    过失,问题是不存在单位srfi-28。 我只是解决了导入实现format 函数的extras 单元。

    (module testModule (sayHello)
      (import chicken scheme)
      (use extras)
    
      (define (sayHello)
        (format #t "ciao")))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-20
      相关资源
      最近更新 更多