[Caml-list] ocamlbuild and pack

2008-09-09 Thread Johannes Kanig
Hi List,

I have the following problem. I have three files, each consisting of one
line:

a.ml: type t = float
b.ml: type t = A.t
c.ml: include B

Now I want to put these modules into a pack, but I only want to export A and
C, so I write a file project.mli:
module A : sig type t end
module C : sig type t = A.t end

As I want to use ocamlbuild, I also create a file project.mlpack:
A
C

Now, the command "ocamlbuild project.cmo" works fine, but I can't build a
library from that:
ocamlbuild  project.cma
Circular dependencies: "project.cmo" already seen in
  [ "b.cmo"; "project.cmo" ]

There clearly aren't any circular dependencies, are there? Am I missing
something?
The problem goes away if I export B instead of C. So the troublemaker seems
to be the include directive.

I almost forgot: I am using ocaml 3.10.2 from godi.

Johannes

-- 
Johannes Kanig
[EMAIL PROTECTED]
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] ocamlbuild and pack

2008-09-09 Thread Johannes Kanig
On Tue, Sep 9, 2008 at 3:51 PM, Nicolas Pouillard <
[EMAIL PROTECTED]> wrote:

> > As I want to use ocamlbuild, I also create a file project.mlpack:
> > A
> > C
>
> B should be in the pack even if you want to hide it.
>

Ok, that was the problem. Thanks!


-- 
Johannes Kanig
[EMAIL PROTECTED]
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] [ANN] mlpost 0.6

2009-02-04 Thread Johannes Kanig
Hi List,

We have just released version 0.6 of mlpost, an ocaml library to
produce nice looking postscript figures with tex-typeset elements.
You can get it at:

http://mlpost.lri.fr/

Here is the changelog:

o - changes in behaviour, new features
* - incompatible changes in the interface

* "open Mlpost" is not added to input files any more -
  users have to add by themselves
* the type Command.figure becomes Command.t
o inclusion of external images (png, jpg etc)
o transformations on boxes
o Box.{grid,gridl,gridi}: new options hpadding, vpadding, stroke, pen
o additional options for many functions
o corrections of some small bugs in box calculations
o A function in the API to scan a TeX file for the prelude

Have fun,

the authors of Mlpost

-- 
Johannes Kanig
johannes.ka...@lri.fr

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Circular dependencies

2009-07-06 Thread Johannes Kanig
On Mon, Jul 6, 2009 at 11:27 AM, Pietro
Abate wrote:
> #cat algo.mlpack
> Pub1
> Pub2
> Out

It's a bit confusing, but the mlpack has to contain all the modules of
the pack, and not only the public modules. So you should add "Private"
here. The circular dependency message is ocamlbuild's way of telling
you.

Johannes

-- 
Johannes Kanig
johannes.ka...@lri.fr

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Circular dependencies

2009-07-06 Thread Johannes Kanig
On Mon, Jul 6, 2009 at 12:56 PM, Pietro
Abate wrote:
> ok, so if now I want to hide the module private.ml I need to add
> algo.mli to hide it . Suppose I've the mli for Pub1 Pub2 and Out .  How
> can I easily (without cut and pasting code) create algo.mli ?  Tell me I
> do not have to manually add the signature of Pub1 Pub2 and Out ...
> searching the list I've got a bad feeling ... Is this the best way to
> hide a module ?

I don't know of a solution without changing your code. You could
either remove your internal .mli files and put all the interfaces into
algo.mli. Or you create a file signatures.mli which contains the
relevant signatures. In pub1.mli, you could then write include
Signatures.Pub1, and so on, and similarly for algo.mli.

Johannes

-- 
Johannes Kanig
johannes.ka...@lri.fr

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] [ANN] mlpost 0.7

2009-07-23 Thread Johannes Kanig
Hello Ocaml users,

We are pleased to announce version 0.7 of the mlpost tool. It can be
downloaded from the ocamlforge:

https://forge.ocamlcore.org/projects/mlpost/

or from its website:

http://mlpost.lri.fr/

See the Changelog:

http://mlpost.lri.fr/download/CHANGES

for new features and small changes; be aware, there are some
incompatible changes.

Enjoy!

The Mlpost authors.

-- 
Johannes Kanig
johannes.ka...@gmail.com

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] annotations and type-checking

2009-07-28 Thread Johannes Kanig

Philippe wrote:

Le 29 juil. 09 à 01:28, Jon Harrop  a écrit :
I'm guessing the scope of the 'a is not what you'd expect but I have 
no idea

why. I'd have thought the latter would be a harmless type annotation...


My guess is that the problem here is not about scope but about 
quantifiers : the type of f is quantified universally by default but the 
annotation constrains the type of f to a fixed (yet unknown) type in the 
subsequent expression (in that sense, yes, the scope of f plays a 
crucial role).


I think John Harrop is right and the scope of 'a is really the issue 
here. First of all, transforming "let ... in" into a top-level let makes 
the code work again:


# let f (x : 'a) : 'a = x;;
val f : 'a -> 'a = 
# f true;;
- : bool = true
# f 3;;
- : int = 3

which suggests that the scope of type variables in annotations is a 
top-level let-binding. I think I have read about this somewhere, but I 
can't find the right page of the manual ...


Also, the following code fails:

# let f (x : 'a) : 'a = x in (f true, (3 : 'a));;
Error: This expression has type int but an expression was expected of 
type bool



Here it is clear that all annotations are talking about the same 
variable 'a. If 'a was existentially bound twice (once for the function 
definition, once for the constant 3), a type error would not occur.


Johannes

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] [MLPost] Curly brances

2010-03-06 Thread Johannes Kanig
Hi,

On Fri, Mar 5, 2010 at 5:51 PM, Alexandre Pilkiewicz
 wrote:
> I'm sorry if that's the wrong list, but mlpost doesn't seem to have
> it's own list.

You can either use the mlpost-users list on mlpost's ocamlforge site -
it hasn't seen much use yet, but this shouldn't hold you off - or
simply send an email to one of the developers.

> I would like to draw variable size curly braces,

Unfortunately, this is trickier than one might think. TeX itself makes
use of some special characters in the font to do it. However, there
still are several possibilities.

The first is to simply scale the "{" character to the right size,
using either Picture.tex or Box.tex and the corresponding xscale /
yscale functions. However, it's difficult to get it right, it never
has quite the right proportions, and rarely looks good.

The second option is to obtain the intended size (using Box.height /
Box.width etc.), get a float value of this size using the
Concrete.float_of_num function and generate the curly brace using the
corresponding latex macro.

The third option would be to use the same trick as latex does
(aligning several characters of the font) in mlpost, but off the top
of my head I couldn't do it right now.

We really should put such a function in the interface ...

Johannes

-- 
Johannes Kanig
johannes.ka...@lri.fr

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] [MLPost] Curly brances

2010-03-06 Thread Johannes Kanig
On Sat, Mar 6, 2010 at 12:45 PM, Alexandre Pilkiewicz
 wrote:
> my mlpost
> (compiled from godi) does not support Concrete.

Normally the GODI package should support everything. The output of the
./configure script (at the beginning of the GODI output) prints if it
uses the cairo backend (in the 0.7.x versions, Concrete is still part
of the cairo backend; this will be better in 0.8). You need bitstring
and the cairo-bindings for this, but the GODI package has the right
dependencies.

Johannes

-- 
Johannes Kanig
johannes.ka...@lri.fr

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] [ANN] release mlpost 0.8.0

2010-04-13 Thread Johannes Kanig
Hello Caml-list,

Mlpost 0.8 is finally out!

You can get it at http://mlpost.lri.fr/ or at the ocamlforge. Notable changes
are a few new modules, such as Tree_adv which delivers more powerful placement
of trees, using overlays, or Real_plot, a nice alternative to Plot for
float-valued functions.

There also is a new system of contributions (contribs), and two contribs for
the moment. The first, Mlpost_lablgtk, allows to easily include Mlpost figures
into a GTK interface. The other one, Mlpost_dot, draws graphs using a
placement as given by the dot(graphviz) tool.

The Cairo backend is considered stable now and delivers mostly identical
results as the Metapost backend. It supports PS, PDF , PNG and SVG
output.

A few minor bugs have been fixed, thanks to Julien Signoles, Stéphane Glondu
and others.

Finally, there are 4 incompatible changes, hopefully they do only affect a few
people.

See the CHANGES file for more details.

Have fun and do not hesitate to submit bug reports, either by mail to the
developers, or via the bug tracking system on the forge.

If you want to follow the Mlpost development more closely, we are now using
a public git repository at the INRIA forge:

git clone git://scm.gforge.inria.fr/mlpost/mlpost.git

The Mlpost developers

-- 
Johannes Kanig
johannes.ka...@lri.fr

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs