When I try to use the function List.nth, the sml shell returns this error message:
- List.nth([1,2,3],0);
[autoloading]
unexpected exception (bug?) in SML/NJ: Io [Io: openIn failed on "/Users/jhr/Work/smlnj/osx-dist/smlnj.dst/sml.boot.x86-unix/smlnj/basis/.cm/x86-unix/basis.cm", No such file or directory]
raised at: Basis/Implementation/IO/bin-io-fn.sml:617.25-617.71
../cm/util/safeio.sml:30.11
../compiler/TopLevel/interact/evalloop.sml:42.54
It returns same error message if I use nth without List. as well.
So I can guess that there is something problem with 'autoloading' the library.
But there are some strange things more.
If I use another basis library function length, it works fine. Like this:
- length ([1,2,3]);
val it = 3 : int
But what if I use List.length? It goes to error. Like this:
- List.length([1,2,3]);
[autoloading]
unexpected exception (bug?) in SML/NJ: Io [Io: openIn failed on "/Users/jhr/Work/smlnj/osx-dist/smlnj.dst/sml.boot.x86-unix/smlnj/basis/.cm/x86-unix/basis.cm", No such file or directory]
raised at: Basis/Implementation/IO/bin-io-fn.sml:617.25-617.71
../cm/util/safeio.sml:30.11
../compiler/TopLevel/interact/evalloop.sml:42.54
So it seems there is definitely something wrong with 'autoloading' stuff, but I can't figure out how to fix it. Please help me finding the problem and fixing it!
Note:
- I use Max OS X 10.13.3, and SML/NJ compiler of v110.81
- 'jhr' in the path is the previous 'user name'. I changed to 'cadenzah'. That is why that path does not exist. There is 'cadenzah' directory in 'Users' directory.
ps. Maybe there is something problem with directory structure of complier itself between previous version and this(v110.81)?