打开 SML 文件 - 使用失败
我使用以下命令在“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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的文件包含两个错误:
-
。'
应该是'
。然而,这些应该分别导致语法错误和一堆“非法令牌”错误,而不是 IO 错误。
我能想到您遇到错误的唯一原因是您输入了错误的文件名。
Your file contains two errors:
-
at the beginning of the line needs to be removed.’
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.
当我将 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.