Re: [Caml-list] using infix operators/functions in modules when not using "open"

2012-04-26 Thread Gabriel Scherer
> Module.("foo" (op) "bar") This is a local open (a more explicit notation is "let open Module in foo op bar"). I think this is a fine solution: I don't like open, but local mitigates its flaws. Another solution is to rebind your operator locally: let (op) = Module.blah in "foo" op "bar" (o

Re: [Caml-list] using infix operators/functions in modules when not using "open"

2012-04-26 Thread Anthony Tavener
Haoyang Wang provided the answer you're looking for, I think! In case you are writing your own modules with infix operators, I've found the following style to be useful: --- Inside Vector.ml --- (* definition of some basic functions here... *) (* now some infix defs using the basic functions, in

Re: [Caml-list] using infix operators/functions in modules when not using "open"

2012-04-26 Thread Haoyang Wang
On Apr 26, 2012, at 3:36 PM, ocamllist.robertw...@spamgourmet.com wrote: > I'm a OCaml newbie. I don't understand how to use infix functions that are > in modules when I don't want to use "open". > > I did discover http://xahlee.org/ocaml/functions.html which explains that an > infix operator

[Caml-list] using infix operators/functions in modules when not using "open"

2012-04-26 Thread ocamllist . robertwork
I'm a OCaml newbie. I don't understand how to use infix functions that are in modules when I don't want to use "open". I did discover http://xahlee.org/ocaml/functions.html which explains that an infix operator can be used as a prefix. So, this format: ((Module.(op)) "foo" "bar") does seem t

Re: [Caml-list] static C library of wrappers: compilation issues

2012-04-26 Thread Xavier ALLAMIGEON
Le 26/04/12 14:23, Alain Frisch a écrit : On 04/26/2012 12:08 PM, Xavier ALLAMIGEON wrote: What do you mean exactly? I imagine that test.o needs some functions of the libhello_world.a. But I don't see why libasmrun would need some other functions of libhello_world... Well, this is the case. li

Re: [Caml-list] static C library of wrappers: compilation issues

2012-04-26 Thread Alain Frisch
On 04/26/2012 12:08 PM, Xavier ALLAMIGEON wrote: What do you mean exactly? I imagine that test.o needs some functions of the libhello_world.a. But I don't see why libasmrun would need some other functions of libhello_world... Well, this is the case. libasmrun contains the runtime system for OCa

Re: [Caml-list] static C library of wrappers: compilation issues

2012-04-26 Thread Xavier ALLAMIGEON
Dear Edwin, Le 26/04/12 10:33, Török Edwin a écrit : Here's the way I'm compiling everything. It builds a libhello_world.a static library from ml_code.obj.o and c_code.o. ocamlc -c ml_code.mli ocamlopt -c ml_code.ml ocamlopt -output-obj ml_code.cmx -o ml_code.obj.o gcc -c c_code.c -I"`ocamlc -w

Re: [Caml-list] static C library of wrappers: compilation issues

2012-04-26 Thread Török Edwin
On 04/26/2012 10:58 AM, Xavier ALLAMIGEON wrote: > Dear caml-list, > > I'd like to build a static C library implementing an interface to an OCaml > library, but I get some compilation errors. Here's an example of the problem. > > 1) The ml_code.* files contain a hello_world function which I'd li

[Caml-list] static C library of wrappers: compilation issues

2012-04-26 Thread Xavier ALLAMIGEON
Dear caml-list, I'd like to build a static C library implementing an interface to an OCaml library, but I get some compilation errors. Here's an example of the problem. 1) The ml_code.* files contain a hello_world function which I'd like to provide in C. let ml_hello_world () = print_en

[Caml-list] EJCP 2012 –clôture des inscriptions le 11 mai

2012-04-26 Thread Alan Schmitt
(This message is for a French summer school, thus it is only in French.) Bonjour à tous, L'École Jeunes Chercheurs en Programmation se déroulera cette année du 15 juin au 23 juin à Dinard et à Rennes, conjointement aux journées GDR – GPL et à la conférence CIEL. Pour toute information sur le pr