Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Ephemeron module is not loaded into the toplevel #7555

vicuna opened this Issue Jun 13, 2017 · 1 comment


None yet
1 participant
Copy link

vicuna commented Jun 13, 2017

Original bug ID: 7555
Reporter: @ivg
Status: resolved (set by @xavierleroy on 2017-06-13T09:28:49Z)
Resolution: fixed
Priority: normal
Severity: minor
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


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, but this sound awkwardly wrong.


This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jun 13, 2017

Comment author: @xavierleroy

This was fixed last January on trunk by the following commit:

I think it is fixed in release 4.04.1 and in the forthcoming 4.05.0 release.

@vicuna vicuna closed this Jun 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.