Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007555OCamltoplevelpublic2017-06-13 11:082017-06-13 11:28
Assigned To 
PlatformOSMacOS OS Version10.11
Product Version4.03.0 
Target VersionFixed in Version4.04.1 
Summary0007555: The Ephemeron module is not loaded into the toplevel
DescriptionThe 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 InformationA 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
xleroy (administrator)
2017-06-13 11:28

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.

- Issue History
Date Modified Username Field Change
2017-06-13 11:08 ivg New Issue
2017-06-13 11:28 xleroy Note Added: 0017875
2017-06-13 11:28 xleroy Status new => resolved
2017-06-13 11:28 xleroy Resolution open => fixed
2017-06-13 11:28 xleroy Fixed in Version => 4.04.1

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker