打开 SML 文件 - 使用失败

发布于 2024-11-10 04:35:47 字数 444 浏览 0 评论 0原文

我使用以下命令在“SML of New Jersey”中打开了一个文件:use "c:\\work.sml",它给了我下一个问题:

[openning c:\\work5.sml]
[use failed: Io: openln failed on "c:\\work.sml", Win32TextPrimIO:openRd: failed]
uncaught Exception error
raised at:../complier/TopLevel/interact.sml:24.14-24.28

work.sml< /strong>,我只有这一行:

- datatype ’a seq = Nil | Cons of ’a * (unit -> ’a seq);

I opened a file in "SML of New Jersey" with the following command: use "c:\\work.sml", and it gives me the next problem:

[openning c:\\work5.sml]
[use failed: Io: openln failed on "c:\\work.sml", Win32TextPrimIO:openRd: failed]
uncaught Exception error
raised at:../complier/TopLevel/interact.sml:24.14-24.28

In work.sml, I have just this one line:

- datatype ’a seq = Nil | Cons of ’a * (unit -> ’a seq);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

独行侠 2024-11-17 04:35:47

您的文件包含两个错误:

  1. 需要删除行开头的 -
  2. ' 应该是 '

然而,这些应该分别导致语法错误和一堆“非法令牌”错误,而不是 IO 错误。

我能想到您遇到错误的唯一原因是您输入了错误的文件名。

Your file contains two errors:

  1. The - at the beginning of the line needs to be removed.
  2. The s should be 's.

However these should cause a syntax error and a bunch of "illegal token" errors respectively, not an IO error.

The only reason I can think of that you get the error you do is that you mistyped the file name.

自控 2024-11-17 04:35:47

当我将 SML New Jersey 的快捷方式固定到任务栏后,我也突然开始遇到这个问题。如果我从此快捷方式运行 SML 并尝试“使用”.sml 文件,则会出现此错误。

因此,基本上确保您的 SML.exe 与您的 .sml 程序位于同一文件夹中,这样应该可以再次正常工作。

I suddenly started experiencing this problem as well after I pinned the shortcut to SML New Jersey to my task bar. If I ran SML from this shortcut and tried to "use" a .sml file it would give this error.

So basically make sure your SML.exe is in the same folder as your .sml programs and this should work fine again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文