Core heap not being available. I have installed Core and Core_kernel via opam.
“Core.Heap” is not available here.
open! Core
…
let pq = Heap.create ;;
Error :
24 | let pq = Heap.create ;;
^^^^^^^^^^^^^^^^
Error: Unbound module Heap
Command to compile : “ocamlfind ocamlc -package core -linkpkg heap_problems.ml”
“opam install core” output is as follows:
[NOTE] Package core is already installed (current version is v0.13.0).
Is heap support removed from Core or am I missing something basic?
xclerc
December 27, 2019, 1:13pm
2
My understanding is that Heap
is now Pairing_heap
, located
in a sublibrary (namely core_kernel.pairing_heap
).
For some reason, we missed this move while preparing the
changelog for v0.13; sorry for the inconvenience.
1 Like
Thanks a ton. For future user following worked for me
“ocamlfind ocamlopt -linkpkg -package core_kernel.pairing_heap heap_problems.ml”
Is it possible to fix this documentation or raise a bug which fixes this?
1 Like
mimoo
May 12, 2021, 7:09pm
5
With a very simple program that simply uses printf
I get that error:
$ ocamlfind ocamlc -package core -linkpkg hello2.ml
ocamlfind: [WARNING] Package `threads': Linking problems may arise because of the missing -thread or -vmthread switch
File "hello2.ml", line 1:
Error: Module `Condition' is unavailable (required by `Error_checking_mutex')
As suggested by the warning, try adding the flag -thread
to the invocation. (It may also succeed if you invoke with -package threads.posix,core
).