我正在尝试使用标准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)