opam

Difference between module and package Ocaml

跟風遠走 提交于 2019-12-07 04:08:13
问题 I'm basically trying to follow this stackoverflow answer located in this post: What is the best module for HttpRequest in OCaml and I'm running in to problems. When I am trying to run a single file with just open Lwt ;; I am getting and error saying it is an unbound module. I have run the following opam instruction: opam install lwt and it did install the correct package . So I think the problem is the difference between a module and a package, which I don't really understand. I was looking

Is it possible to make an opam “sandbox”?

喜欢而已 提交于 2019-12-06 08:25:20
问题 I have two ocaml projects being compiled with ocaml 4.02.1. Is there a way to create separate opam installations for each project instead of having both projects install their dependencies in the global 4.02.1 opam switch? 回答1: In opam you can have several installations of the same compiler: opam switch -A 4.02.1 proj1 opam switch -A 4.02.1 proj2 will create two separate independent stacks for each project. You may also find these commands useful: opam switch export opam switch import 来源:

opam upgrade wants to downgrade a bunch of packages

会有一股神秘感。 提交于 2019-12-06 00:25:22
I just tried an 'opam upgrade' and got (the final summary): 1 to install | 59 to reinstall | 3 to upgrade | 34 to downgrade | 0 to remove Do you want to continue ? [Y/n] Downgrading 34 packages makes me nervous. Why would it want to do this? Some examples of packages it wanted to downgrade: downgrade llvm.3.2 to 3.1 downgrade ocamlfind.1.4.0 to 1.3.3 [required by bitstring, camltc, ezjsonm, fat-filesystem, google-drive-ocamlfuse, merlin, mirage-block-xen, mirage-console-xen, mirari, utop] downgrade SPOC.130624 to 121217 downgrade bitstring.2.0.4 to 2.0.3 downgrade camlzip.1.05 to 1.04

How to make library installed from OPAM available to OCaml?

 ̄綄美尐妖づ 提交于 2019-12-05 22:41:30
I followed this tutorial on OCaml FFI and installed Ctypes through OPAM: opam install ctypes However, OCaml does not find the module: open Ctypes (* ... *) I receive the error: Unbound module Ctypes It looks like I need to let OCaml know where my Ctypes installation is? Do I need to update some path variable to let OCaml look for my libraries installed through OPAM? This is Ubuntu 15.04, OCaml 4.01.0, OPAM 1.2.0. Installing something on your system doesn't make it automatically visible for the compiler, this is true not only for OCaml, but for most conventional systems, like C or C++ to name a

Difference between module and package Ocaml

倖福魔咒の 提交于 2019-12-05 10:09:58
I'm basically trying to follow this stackoverflow answer located in this post: What is the best module for HttpRequest in OCaml and I'm running in to problems. When I am trying to run a single file with just open Lwt ;; I am getting and error saying it is an unbound module. I have run the following opam instruction: opam install lwt and it did install the correct package . So I think the problem is the difference between a module and a package, which I don't really understand. I was looking at this question as a possible answer, but I wasn't sure if it was what I needed. Unbound modules in

Is it possible to make an opam “sandbox”?

南笙酒味 提交于 2019-12-04 14:49:52
I have two ocaml projects being compiled with ocaml 4.02.1. Is there a way to create separate opam installations for each project instead of having both projects install their dependencies in the global 4.02.1 opam switch? ivg In opam you can have several installations of the same compiler: opam switch -A 4.02.1 proj1 opam switch -A 4.02.1 proj2 will create two separate independent stacks for each project. You may also find these commands useful: opam switch export opam switch import 来源: https://stackoverflow.com/questions/27640897/is-it-possible-to-make-an-opam-sandbox

OCaml: Can't run utop after installing it

試著忘記壹切 提交于 2019-12-04 03:01:40
I'm trying to learn OCaml through the Real World OCaml book. They have a guide by which I am supposed to install the Core package and utop. However, while I seem to be successfully installing both of these using Opam, neither of them works when I try to use them. I know that they're installed, because when I try to install them again, I get this message: $ opam install utop core [NOTE] Package utop is already installed (current version is 1.10). [NOTE] Package core is already installed (current version is 109.55.02). However, when I try to enter "utop" to start utop, it doesn't work. $ utop

llvm OCaml bindings

时光总嘲笑我的痴心妄想 提交于 2019-12-03 09:28:21
I'm working on llvm OCaml bindings. I installed llvm package through opam ( opam install llvm ), when I use llvm in utop, I get the following error: #require "llvm";; Error: The external function 'llvm_global_succ' is not available. The opam llvm version is 3.2. I also tried building llvm3.3 from the official site ( ./configure --with-ocaml-libdir='ocamlc -where' ), the build was successful (all the llvm command-line tools are working), but I got the same error in utop. I'm on Mac OS 10.7.5. Edit: I solved it.. ocamlmktop -o llvmtop llvm.cma -cc g++ Then launch llvmtop , you can use llvm

Using Opam to manage project dependencies

冷暖自知 提交于 2019-12-02 23:02:56
I am a complete newbie to OCaml. Other languages I have used (for instance Scala, Clojure, Javascript on Node.js) have package managers that allow one to start a project as a clean slate that has a declared set of dependencies of known versions. I am trying to do something of the sort with Opam. Ideally, I would like to have a file that lists dependencies (and possibly OCaml version) so that a collaborator can start a project with git clone myproject <magic opam command> ocamlbuild and have a working version, without having installed anything globally. I understand that the right way to do

Ocaml and Opam: unbound module Core

心不动则不痛 提交于 2019-12-02 15:24:37
I'm trying to get an ocaml environment set up, and I've followed the instructions from appendix A of the Real World Ocaml beta. I set up opam, and installed a version of ocaml with the command $ opam switch 4.01.0dev+trunk which passed fine. I then did an $ eval `opam config env` to pull in the changes. I'm running the correct top level, as $ which ocaml outputs /home/bryan/.opam/4.01.0dev+trunk/bin/ocaml I installed the Core package from Jane street, with the command $ opam install core Both ocamlfind and opam search show that the package was installed correctly. However when I try to open it