Re: [Caml-list] Marshalling question

2010-10-12 Thread Alexey Rodriguez
Julien, Mathias, Thanks for the detailed description of this issue. Mathias, we use the same solution: concrete graphs and explicit identifiers so we do not suffer from the deserialization issue. Good to know about the pitfalls of abstract graphs though. Cheers, Alexey On Tue, Oct 12, 2010 at

Re: [Caml-list] Marshalling question

2010-10-12 Thread Alexey Rodriguez
On Fri, Oct 8, 2010 at 3:48 PM, Mathias Kende wrote: > Exception are some complex datastructure which may require additional > care when marshalled. An example of which are the graphs of the > ocamlgraph library (even the functional one), but there is none in the > standard library. Mathias, can

Re: [Caml-list] Preventing values from escaping a context

2010-02-11 Thread Alexey Rodriguez
On Thu, Feb 11, 2010 at 12:05 PM, wrote: >> But for this you need support from the type system (rank-2 universal >> quantification). > > FWIW, OCaml can express that, but it doesn't help the problem. Andreas, I'd be interested in seeing such encodings. Any pointers? Thanks! Cheers, Alexey _

Re: [Caml-list] Preventing values from escaping a context

2010-02-11 Thread Alexey Rodriguez
On Tue, Feb 9, 2010 at 4:59 AM, Yaron Minsky wrote: > > I don't know that monads solve your problem here, but monads are a perfectly > reasonable idiom in OCaml.  You won't find them in the standard library > because the standard library is very conservative.  But you will find them > in Jane Stre

Re: [Caml-list] Re: Generating comments from camlp4

2009-09-16 Thread Alexey Rodriguez
Thanks for the tip Jake. I arrived to a similar conclusion by doing experiments on source files with comments but I did not pinpoint the exact location in camlp4's sources. As you say, a solution that injects comments would probably look very hacky. I decided to go for Tiphaine's suggestion. After

[Caml-list] Re: Generating comments from camlp4

2009-09-15 Thread Alexey Rodriguez
t the generated code with stop tags: (** / **). In camlp4 comments are tokens but I do not quite see how to generate tokens from camlp4 quotations. So at the moment I have the impression that I cannot solve this problem at the camlp4 level. Cheers, Alexey On Fri, Sep 11, 2009 at 3:59 PM, A

Re: [Caml-list] Ocamldoc and multiple packages

2009-09-15 Thread Alexey Rodriguez
Hi Edgar, On Sat, Sep 12, 2009 at 5:27 PM, Edgar Friendly wrote: > Alexey Rodriguez wrote: >> Dear list, >> >> I am trying to build ocamldoc documentation for an ocaml project that >> contains multiple packages (collections of modules built using >> -for-pack a

[Caml-list] Ocamldoc and multiple packages

2009-09-11 Thread Alexey Rodriguez
Dear list, I am trying to build ocamldoc documentation for an ocaml project that contains multiple packages (collections of modules built using -for-pack and -pack). My current setup generates documentation for each package but it won't generate hyperlinks to modules in other packages (module not

[Caml-list] Generating comments from camlp4

2009-09-11 Thread Alexey Rodriguez
Dear list, Is there a way to generate comments from camlp4 code? We have preprocessors that generate the following kind of code in signatures: > <:sig_item< >$sig_generator the_type_declaration$; > >> However, these extra function signatures show up in the output of ocamldoc which is very

Re: [Caml-list] Partially hiding modules in packages

2009-09-10 Thread Alexey Rodriguez
Thanks to all who replied. I have solved my problem, but I still have a question regarding clashing type definitions. On Wed, Sep 9, 2009 at 9:40 PM, blue storm wrote: > The problem with your packages.tgz example is that you use "module > type Foo = .." in the .mli. This gives the signature of a

[Caml-list] Partially hiding modules in packages

2009-09-09 Thread Alexey Rodriguez
Dear list, My question is about how to hide modules (or parts thereof) in an ocaml package from the outside world (users of the package). I am trying to build an ocaml package with internal functionality (types and functions) that I do not want to expose. I have two modules in the package impleme

Re: [Caml-list] ocamlopt debugging options

2009-06-18 Thread Alexey Rodriguez
On Thu, Jun 18, 2009 at 4:10 PM, Mark Shinwell wrote: > > Exactly what form of symbolic name are you referring to?  Function names > are preserved (although they are mangled, but it's a lot easier to > decipher than C++ mangling). You are absolutely right. I was my own mistake, see the other messa

Re: [Caml-list] ocamlopt debugging options

2009-06-18 Thread Alexey Rodriguez
2009/6/18 Daniel Bünzli : > > If you compile with -S they should not be gone in the generated assembly > file. More explanations here : > > http://ocaml-tutorial.org/performance_and_profiling Thank you! It was my silly mistake after all. I was testing a small program to see whether functions woul

Re: [Caml-list] ocamlopt debugging options

2009-06-18 Thread Alexey Rodriguez
On Thu, Apr 23, 2009 at 12:34 PM, Mark Shinwell wrote: > I use objdump -Dr :) Ok. It took me a long to reply to this, but better late than never. I used objdump as you suggested and I do not mind reading assembler but I have the same problem as with cmm, namely that symbolic names are gone. So,

[Caml-list] ocamlopt debugging options

2009-04-23 Thread Alexey Rodriguez
Dear List, Sometimes it is useful to see what is the code produced by ocamlopt in order to assess the performance of programming constructs. It is possible to use -dcmm, but it is difficult to relate ocaml functions to their compiled form due to the names used in the cmm dump. How do you people ge