2
votes

I am new to OCaml and i am trying to use its HANSEI library. For that, i need to include few .ml and .mli files as mentioned here along with caml-shift.tar.gz as mentioned here.

Initial line of contents in my MakeFile is as follows:

# HANSEI: OCaml library for direct probabilitic programming
#
# The library requires the caml-shift library, delimcc.cma and the 
# correspondent .mli files. See caml-shift.tar.gz.
# Please adjust DELIMCC= below to point to the library.
#
# The typical command to use the OCaml top-level:
# $ ocaml -I ../../Continuations/caml-shift/ \
#       ../../Continuations/caml-shift/delimcc.cma
# and then do #load "prob.cma";;

# $Id$

DELIMCC=/root/.opam/4.00.1/lib/caml-shift
OCAMLC=ocamlc
OCAMLOPT=ocamlopt

DELIMCCRUN=-I $(DELIMCC) -dllpath $(DELIMCC) $(DELIMCC)/delimcc.cma
DELIMCCINT=$(DELIMCC)/delimcc.cmi
DELIMCCOPT=-I $(DELIMCC)  $(DELIMCC)/delimcc.cmxa

LIB=prob.cma
LIBOPT=prob.cmxa
.
.
.

Comment section of the MakeFile suggests me to have delimcc.cma file along with other .ml and .mli files but I am not sure how to create .cma files. I am not able to find already created delimcc.cma file. Please help me with this. Please let me know in case my understanding is wrong. Thanks!

2
How are your OCaml skills? Or ML? What of the OCaml programming environment do you have installed? What system type? This would giva a hint on how explicit an answer must be. - Str.
This Makefile has an absolute path for DELIMCC, and one for the root user only. This is not portable. - Str.

2 Answers

0
votes

Looks like you need to build delimcc library first, before using it..

0
votes

Use the opam package installer:

opam search delimcc
Available packages for system:
delimcc  --  Oleg's delimited continuations library for byte-code and native OCaml