ocamlutopocaml-core

I can't access the OCaml [open Core.std] library despite downloading it from Github


I'm learning OCaml with the textbook "Real World OCaml." I'm running into a continuous problem though: I can't seem to access Jane Street's OCaml standard library package.

I went to Jane Street's Github page and downloaded the core package from https://github.com/janestreet/core and ran it, just like the book instructed me to.

However, whenever I type:

open Core.std

The utop environment tells me that the value is unbound. I'm not familiar as to what "unbound" in this context means, but I'm assuming that it means that the library either was not installed properly or there is a problem with the OCaml that I have installed in my Windows machine.


Solution

  • You have to load core prior to open it. In utop :

      utop #     #require "core";;
    

    Note also that Core.Std is now deprecated (you will get this message in utop), Core is enough (open Core;;)