You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7555 Reporter:@ivg Status: resolved (set by @xavierleroy on 2017-06-13T09:28:49Z) Resolution: fixed Priority: normal Severity: minor OS: MacOS OS Version: 10.11 Version: 4.03.0 Fixed in version: 4.04.1 Category: toplevel
Bug description
The Ephemeron module neither can be used in the toplevel nor be loaded into it. Since Ephemeron is a part of the stdlib.cma archive I would assume, that it should work without any action from a user, especially, since no cma or cmo file is shipped with the compiler, that will allow us to enable the Ephemeron module explicitly in the toplevel with the load directive.
Steps to reproduce
$ ocaml
OCaml version 4.03.0
#show Ephemeron.K1.create;;
val create : unit -> ('k, 'd) Ephemeron.K1.t
Ephemeron.K1.create;;
Error: Reference to undefined global `Ephemeron'
(* OCaml 4.04.0 manifests the same behavior *)
Additional information
A workaround is to load the stdlib.cma archive explicitly, either with the load directive or by passing it as an object to the toplevel, e.g.,
ocaml stdlib.cma
I've tried to figure out how top-level loads the code, and apparently it automatically loads all modules, that are imported, and since Ephemeron is not used in any of the toplevel libraries it is not loaded. A possible workaround would be to add a bogus module E = Ephemeron to the toploop.ml, but this sound awkwardly wrong.
The text was updated successfully, but these errors were encountered:
Original bug ID: 7555
Reporter: @ivg
Status: resolved (set by @xavierleroy on 2017-06-13T09:28:49Z)
Resolution: fixed
Priority: normal
Severity: minor
OS: MacOS
OS Version: 10.11
Version: 4.03.0
Fixed in version: 4.04.1
Category: toplevel
Bug description
The Ephemeron module neither can be used in the toplevel nor be loaded into it. Since Ephemeron is a part of the stdlib.cma archive I would assume, that it should work without any action from a user, especially, since no cma or cmo file is shipped with the compiler, that will allow us to enable the Ephemeron module explicitly in the toplevel with the load directive.
Steps to reproduce
$ ocaml
OCaml version 4.03.0
#show Ephemeron.K1.create;;
val create : unit -> ('k, 'd) Ephemeron.K1.t
Ephemeron.K1.create;;
Error: Reference to undefined global `Ephemeron'
(* OCaml 4.04.0 manifests the same behavior *)
Additional information
A workaround is to load the stdlib.cma archive explicitly, either with the load directive or by passing it as an object to the toplevel, e.g.,
I've tried to figure out how top-level loads the code, and apparently it automatically loads all modules, that are imported, and since Ephemeron is not used in any of the toplevel libraries it is not loaded. A possible workaround would be to add a bogus module E = Ephemeron to the toploop.ml, but this sound awkwardly wrong.
The text was updated successfully, but these errors were encountered: