mlkit
MLKit v4.7.5 (v4.7.5-2-g685fe424 - 2023-11-02T10:40:03+01:00) [X64 Backend]
|Garbage collection disabled - it is not supported in the REPL!
|Type :help; for help...
. :load hello.mlb;
[reading source file: hello.sml]
> structure Hello :
sig
val hello : string
end
. Hello.hello;
> val it = "hello" : string
.
However, if I add the basis library to the MLB file, then I can't access Hello.hello from the REPL anymore:
hello.mlb:
$(SML_LIB)/basis/basis.mlb
hello.sml
mlkit
MLKit v4.7.5 (v4.7.5-2-g685fe424 - 2023-11-02T10:40:03+01:00) [X64 Backend]
|Garbage collection disabled - it is not supported in the REPL!
|Type :help; for help...
. :load hello.mlb;
[reading source file: hello.sml]
> structure Hello :
sig
val hello : string
end
. Hello.hello;
std_in, line 2, column 0:
Hello.hello;
^^^^^^^^^^^
unbound identifier Hello.hello.
.
Side effects in the hello.sml file still work though:
hello.sml:
structure Hello = struct
val hello = "hello"
end
val _ = print Hello.hello
mlkit
MLKit v4.7.5 (v4.7.5-2-g685fe424 - 2023-11-02T10:40:03+01:00) [X64 Backend]
|Garbage collection disabled - it is not supported in the REPL!
|Type :help; for help...
. :load hello.mlb;
[reading source file: hello.sml]
> structure Hello :
sig
val hello : string
end
hello.
When I have the files:
hello.mlb
:hello.sml
:Then I can do this in the REPL:
However, if I add the basis library to the MLB file, then I can't access
Hello.hello
from the REPL anymore:hello.mlb
:Side effects in the
hello.sml
file still work though:hello.sml
: