Hello Everyone! I'm completely new to OCaml, but I've read that it's a good practice to start by having both Batteries and the Core module installed. I'm using Ubuntu 16.04, and installed ocaml, opam, utop from the official PPAs as it seemed that the one provided for Ubuntu (|avsm/ppa) is not working for 16.04! After installation I did opam init, and all the setups it asked me to do. In my .ocamlinit file I have what I've found as a fix for the error 'unbound module'. For one time utop found the modules, but since then it gives me an error. |Cheers, Roland |||-------------------------------------------------------------------- ||Judging by the output of opam, the packages should be installed correctly : $ opam list # Installed packages for system: base-bigarray base Bigarray library distributed with the OCaml compi base-bytes base Bytes library distributed with the OCaml compiler base-ocamlbuild base OCamlbuild binary and libraries distributed with base-threads base Threads library distributed with the OCaml compil base-unix base Unix library distributed with the OCaml compiler batteries 2.5.2 a community-maintained standard library extension bin_prot 113.33.03 A binary protocol generator cmdliner 0.9.8 Declarative definition of command line interfaces conf-m4 1 Virtual package relying on m4 core 113.33.03 Industrial strength alternative to OCaml's standa core_kernel 113.33.03 Industrial strength alternative to OCaml's standa cppo 1.3.2 Equivalent of the C preprocessor for OCaml progra depext 1.0.1 Query and install external dependencies of OPAM p fieldslib 113.33.03 Syntax extension to define first class values rep js-build-tools 113.33.04 Collection of tools to help building Jane Street ocamlbuild 0 Build system distributed with the OCaml compiler ocamlfind 1.6.2 A library manager for OCaml ppx_assert 113.33.03 Assert-like extension nodes that raise useful err ppx_bench 113.33.03 Syntax extension for writing in-line benchmarks i ppx_bin_prot 113.33.03 Generation of bin_prot readers and writers from t ppx_compare 113.33.03 Generation of comparison functions from types ppx_core 113.33.03 Standard library for ppx rewriters ppx_custom_printf 113.33.03 Printf-style format-strings for user-defined stri ppx_deriving 4.0 Type-driven code generation for OCaml >=4.02 ppx_driver 113.33.03 Feature-full driver for OCaml AST transformers ppx_enumerate 113.33.03 Generate a list containing all values of a finite ppx_expect 113.33.03 Cram like framework for OCaml ppx_fail 113.33.03 Add location to calls to failwiths ppx_fields_conv 113.33.03 Generation of accessor and iteration functions fo ppx_here 113.33.03 Expands [%here] into its location ppx_inline_test 113.33.03 Syntax extension for writing in-line tests in oca ppx_jane 113.33.03 Standard Jane Street ppx rewriters ppx_let 113.33.03 Monadic let-bindings ppx_optcomp 113.33.03 Optional compilation for OCaml ppx_pipebang 113.33.03 A ppx rewriter that inlines reverse application o ppx_sexp_conv 113.33.03 Generation of S-expression conversion functions f ppx_sexp_message 113.33.03 A ppx rewriter for easy construction of s-express ppx_sexp_value 113.33.03 A ppx rewriter that simplifies building s-express ppx_tools 5.0+4.02.0 Tools for authors of ppx rewriters and other synt ppx_type_conv 113.33.03 Support Library for type-driven code generators ppx_typerep_conv 113.33.03 Generation of runtime types from type declaration ppx_variants_conv 113.33.03 Generation of accessor and iteration functions fo re 1.6.1 RE is a regular expression library for OCaml result 1.2 Compatibility Result module sexplib 113.33.03 Library for serializing OCaml values to and from typerep 113.33.03 typerep is a library for runtime types. variantslib 113.33.03 Part of Jane Street's Core library | ||-------------------------------------------------------------------- |My .ocmalinit : ||#use "topfind";; #thread;; #camlp4o;; #require "core.std";; #require "core.syntax";; #require "batteries";; let () = try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") with Not_found -> () ;||; -------------------------------------------------------------------- What ocaml prints : $ ocaml OCaml version 4.02.3 Findlib has been successfully loaded. Additional directives: #require "package";; to load a package #list;; to list the available packages #camlp4o;; to load camlp4 (standard syntax) #camlp4r;; to load camlp4 (revised syntax) #predicates "p,q,...";; to set these predicates Topfind.reset();; to force that packages will be reloaded #thread;; to enable threads /usr/lib/ocaml/threads: added to search path /usr/lib/ocaml/unix.cma: loaded /usr/lib/ocaml/threads/threads.cma: loaded /usr/lib/ocaml/dynlink.cma: loaded /usr/lib/ocaml/camlp4: added to search path /usr/lib/ocaml/camlp4/camlp4o.cma: loaded No such package: core.std /home/zen3ger/.opam/system/lib/core: added to search path /usr/lib/ocaml/nums.cma: loaded /home/zen3ger/.opam/system/lib/num-top: added to search path /home/zen3ger/.opam/system/lib/num-top/num_top.cma: loaded Camlp4 Parsing version 4.02.3 /home/zen3ger/.opam/system/lib/num: added to search path /usr/lib/ocaml/bigarray.cma: loaded /usr/lib/ocaml/str.cma: loaded /home/zen3ger/.opam/system/lib/bytes: added to search path /home/zen3ger/.opam/system/lib/batteries: added to search path /home/zen3ger/.opam/system/lib/batteries/batteries.cma: loaded /home/zen3ger/.opam/system/lib/batteries/batteriesConfig.cmo: loaded /home/zen3ger/.opam/system/lib/batteries/batteriesHelp.cmo: loaded /home/zen3ger/.opam/system/lib/batteries/batteriesPrint.cmo: loaded /home/zen3ger/.opam/system/lib/batteries/batteriesThread.cma: loaded /home/zen3ger/.opam/system/lib/batteries/batteriesThread.cma: loaded | ||-------------------------------------------------------------------- What utop prints : Findlib has been successfully loaded. Additional directives: #require "package";; to load a package #list;; to list the available packages #camlp4o;; to load camlp4 (standard syntax) #camlp4r;; to load camlp4 (revised syntax) #predicates "p,q,...";; to set these predicates Topfind.reset();; to force that packages will be reloaded #thread;; to enable threads No such package: core.std No such package: core.syntax No such package: batteries ||