English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Ocaml library implementing equivalence classes and partial orders
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-05-30 (20:26)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: ocamlc command line suggested features
From: "thierry BRAVIER" <thierry.bravier@dassault-aviation.fr>

> I have been trying labltk since ocaml-2.99 first with: labltklink
> and now with: ocamlc -I$STDLIB/labltk labltk.cma foo.ml
> * First, it made me think that an ocamlc -where option
> (similar to that of camlp4) would be useful to get $STDLIB from ocamlc.
> This would make it possible to use:
> ocamlc -I `ocamlc -where`/labltk foo.ml
> Remark 1: currently, I get $STDLIB from: (ocamlc -v  | some scritpt) which is
> a pain,

Indeed a -where option would be useful, I also have lots of makefiles
using the same script as you, in particular for the install procedure.

But in this precise case, I would prefer the approach suggested by
Sven Luther: to have an abbreviated notation for paths under the
standard library directory.

For instance we could have
        ocamlc -I +labltk

Remark that now that we have the autolink mechanism, package path +
library name is all you need to link in a library.
(findlib is certainly more powerful, but it needs some form of
meta-information, which is better handled outside of the compiler)

> * Second, since the documentation for labltk is short I often find myself
> using the toplevel just to check the type of say Tk.pack or
> Scale.configure.

I should have made more evident in the manual that you _must_ use
ocamlbrowser (if labltk works, it works!). Then looking for function
types is trivial. (Don't forget to configure your path to include
the labltk directory.)

> Wouldn't it be nice if we could just say:
> ocamlc -sig labltk.cma

.cma files do not contain typing information, you have to look inside
.cmi files for that. And this is what ocamlbrowser does.


Jacques Garrigue      Kyoto University     garrigue at kurims.kyoto-u.ac.jp
		<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>