[Caml-list] ocamldoc: Howto crossreference another library?

2012-03-07 Thread Hendrik Tews
Hi, consider (** Uses {!print_endline} *) let f () = print_endline Hello What do I have to do such that ocamldoc generates a crossreference to file:///usr/share/doc/ocaml-doc/ocaml.html/libref/Pervasives.html#VALprint_endline ? Bye, Hendrik -- Caml-list mailing list. Subscription

Re: [Caml-list] ocamldoc: Howto crossreference another library?

2012-03-07 Thread Maxence Guesdon
On Wed, 7 Mar 2012 09:58:02 +0100 Hendrik Tews t...@os.inf.tu-dresden.de wrote: Hi, Hello, consider (** Uses {!print_endline} *) let f () = print_endline Hello What do I have to do such that ocamldoc generates a crossreference to

[Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Matej Košík
Hi, I would like to print out the response of a modified Ocaml's typechecker to various inputs. One way to do it would be to write a pretty-printer by hand. Before I do that, I would like to apply deriving machinery: http://code.google.com/p/deriving/wiki/Introduction to this (chore) job. In

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Gabriel Scherer
You can inject the definition you want in the following way: module Meths = struct include Meths module Show_t = ... end type value_kind = ... deriving (Show) This works because deriving, being a Camlp4 extension, does not refer to the module Meths, but any module Meths that is

[Caml-list] odb questions

2012-03-07 Thread Daniel Bünzli
Hello, A few questions about odb. 1) Is it possible to specify in ~/.odb/packages a remote packages file (instead of just individual remote packages) ? 2) How does odb find out and manage dependencies ? How can I list them before installing a package ? 3) Are multiple versions of the same

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Yaron Minsky
Are you familiar with type-conv and the family of syntax-extensions that go along with it? You can do thinks like: type t = { foo: int; bar: string } with sexp, compare, bin_io and automatically get sexp-conversion functions, a comparison function, and binary protocol converters. And

Re: [Caml-list] odb questions

2012-03-07 Thread Edgar Friendly
On 03/07/2012 07:32 AM, Daniel Bünzli wrote: Hello, A few questions about odb. 1) Is it possible to specify in ~/.odb/packages a remote packages file (instead of just individual remote packages) ? Not at the moment, but this is an interesting idea. The only support for remote packages is

[Caml-list] Can one implement greedy/inline data structures in ocaml?

2012-03-07 Thread Goswin von Brederlow
Hi, I'm wondering if it is possible to implement greedy/inline data structures in ocaml in a generic and reusable way. Maybe you don't know what greedy/inline data structures are or maybe I'm using the wrong name. So here is what I mean: Say you have a task structure that is in 2 doubly linked

Re: [Caml-list] Can one implement greedy/inline data structures in ocaml?

2012-03-07 Thread Edgar Friendly
On 03/07/2012 09:41 AM, Goswin von Brederlow wrote: The task then needs pointers to each of the lists data structures creating cycles. Not good for ocaml. It also would waste memory for 2 pointers (per list). Cycles are fine for ocaml, pointers are pretty cheap, and I think the answer to your

Re: [Caml-list] state of native dynlink on os x

2012-03-07 Thread Alan Schmitt
On 7 mars 2012, at 11:55, Damien Doligez wrote: Hi Alan, OS X 10.7.3, ocaml 3.12.1-godi2. You need to apply the patch from this PR: http://caml.inria.fr/mantis/view.php?id=4863 From your configure output, I presume godi uses the patch from this PR:

Re: [Caml-list] odb questions

2012-03-07 Thread Daniel Bünzli
Le mercredi, 7 mars 2012 à 15:37, Edgar Friendly a écrit : Not at the moment, but this is an interesting idea. The only support for remote packages is the querying of oasis-db. The protocol is nearly trivial, so you're welcome to make your own server (can be just a plain web server serving

Re: [Caml-list] odb questions

2012-03-07 Thread Edgar Friendly
On 03/07/2012 10:47 AM, Daniel Bünzli wrote: Okay. Would be nice to have the support in the tool and documentation on how to make your own package source (basically GET on a ~/.odb/packages file ?). Package distribution should be distributed. one file per package, filename is package name,

Re: [Caml-list] odb questions

2012-03-07 Thread Daniel Bünzli
Le mercredi, 7 mars 2012 à 16:58, Edgar Friendly a écrit : IMHO a package should be identified by a name and version. I've been thinking about this for a long time, and the full consequences of this involve not only deep changes to odb internals, but also expose the code to a ton more

Re: [Caml-list] Can one implement greedy/inline data structures in ocaml?

2012-03-07 Thread Goswin von Brederlow
Edgar Friendly thelema...@gmail.com writes: On 03/07/2012 09:41 AM, Goswin von Brederlow wrote: The task then needs pointers to each of the lists data structures creating cycles. Not good for ocaml. It also would waste memory for 2 pointers (per list). Cycles are fine for ocaml, pointers

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Matej Košík
On 03/07/2012 12:34 PM, Yaron Minsky wrote: Are you familiar with type-conv and the family of syntax-extensions that go along with it? You can do thinks like: type t = { foo: int; bar: string } with sexp, compare, bin_io and automatically get sexp-conversion functions, a

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Matej Košík
On 03/07/2012 12:31 PM, Gabriel Scherer wrote: You can inject the definition you want in the following way: module Meths = struct include Meths module Show_t = ... end type value_kind = ... deriving (Show) This works because deriving, being a Camlp4 extension, does

Re: [Caml-list] Can one implement greedy/inline data structures in ocaml?

2012-03-07 Thread Gabriel Scherer
So then you need mutable option types or mutables that you initialize with dummy values and then overwrite with the real thing once all members of a cycle are created. Or some other trickery to make it work. Overall cycles are generally not good. I believe the trick you need (either passing a

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Jérémie Dimino
Le Wed, 07 Mar 2012 16:44:20 +, Matej Košík 5764c029b688c1c0d24a2e97cd7...@gmail.com a écrit : The above problem can indeed be solved, i.e. pretty-printer can be generated in this way. The tricky part is to figure out how to define the Show_t module definition, which is non-obvious. If

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Markus Mottl
On Wed, Mar 7, 2012 at 11:44, Matej Košík 5764c029b688c1c0d24a2e97cd7...@gmail.com wrote: I have found one (I guess unnecessary) disadvantage over `deriving'. If you process your *.ml file with sexplib/bin_prot preprocessor, you have to append with ... suffix to every type definition, otherwise

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Matej Košík
Hi Markus, On 03/07/2012 05:10 PM, Markus Mottl wrote: On Wed, Mar 7, 2012 at 11:44, Matej Košík 5764c029b688c1c0d24a2e97cd7...@gmail.com wrote: I have found one (I guess unnecessary) disadvantage over `deriving'. If you process your *.ml file with sexplib/bin_prot preprocessor, you have to

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Till Varoquaux
You are the wrong version of camlp4 (the different campl4 binaries load different libraries, syntaxes etc...). If you switch camlp4orf to camlp4o your code should compile fine. Also note that I would recommend using the excellent ocamlfind tool: ocamlfind c -linkpkg -package

[Caml-list] oasis packaging questions

2012-03-07 Thread Daniel Bünzli
Hello, I'd like to support oasis in the various packages I distribute. Here are a few questions (using oasis v0.3.2~rc2). 1) All the packages I distribute are made of a single module. For now these were just installed as .cmo .cmx .cmxs. Now it seems oasis forces me to create a .mllib even

Re: [Caml-list] odb questions

2012-03-07 Thread Francois Berenger
On 03/07/2012 11:37 PM, Edgar Friendly wrote: [...] Except I don't intend odb to scale. It's hovering right around 500 lines of code, and if I can keep it around that size, I'll be happy. I don't intend odb to ever have a `odb remove foo` command Hi, Wouldn't it be possible to have 'odb

Re: [Caml-list] concerning using of `deriving' syntactic plugin

2012-03-07 Thread Markus Mottl
On Wed, Mar 7, 2012 at 12:28, Matej Košík 5764c029b688c1c0d24a2e97cd7...@gmail.com wrote: If you remove any of the with sexp clauses, you will get a preprocessor error:  File main.ml, line 4, characters 18-23:  Parse error: with expected after [type_declaration] (in [str_item])  File