小编got*_*ops的帖子

使用CM.make的SML/NJ:"错误:非法字符"

我正在尝试使用标准ML的 Shipman的Unix系统编程编译以下程序:

structure Main=
struct

    fun main(arg0, argv) =
    (
        case argv of
          [] => ()
        | (first::rest) =>
        (
            print first;
            app (fn arg => (print " "; print arg)) rest;
            print "\n"
        );

        OS.Process.success
    )

    val _ = SMLofNJ.exportFn("echo", main)
end
Run Code Online (Sandbox Code Playgroud)

我的.cm文件看起来像:

group is
    $/basis.cm
    echo.sml
Run Code Online (Sandbox Code Playgroud)

当我运行时,CM.make "echo.sml";我收到以下错误消息:

gotchops@gotchops-vm:~/Documents/USPwSML/Ch2/echo$ CM_ROOT=echo.cm sml
Standard ML of New Jersey v110.80 [built: Fri Sep 16 22:36:30 2016]
- CM.make "echo.sml";
[autoloading]
[library $smlnj/cm/cm.cm is stable]
[library $smlnj/internal/cm-sig-lib.cm …
Run Code Online (Sandbox Code Playgroud)

sml smlnj cm

5
推荐指数
1
解决办法
204
查看次数

标签 统计

cm ×1

sml ×1

smlnj ×1