* Ocaml library implementing equivalence classes and partial orders
@ 2000-05-22 23:56 nari
2000-05-25 7:53 ` ocamlc command line suggested features thierry BRAVIER
0 siblings, 1 reply; 4+ messages in thread
From: nari @ 2000-05-22 23:56 UTC (permalink / raw)
To: caml-list
Hi,
I was wondering why there has been no Ocaml library implementation
for equivalence and partial order relations (at least over basic types)
just
as we have a 'Set' library over ordered types.
For example,
an equivalence class module may export functions such as
type t
val create_equiv: Set.t -> eqrelation.t -> t
val query_eqclass: t -> Set.elt -> Set.t
........
If the user specifies a set of elements and the user defines the
equivalence relation
on those elements, the function should return a datatype that
can be further queried for equivalence classes of individual elements.
Is there any specific reason why such a generic library may be
hard to implement? If not, are there any implementation issues we
need to be concerned about.
Thanx.
--
**************************************************************************
Narayanan Krishnamurthy (Nari)
ASP Advanced Tools and Methodology
Motorola SPS Architecture and Systems Platforms
Motorola Inc. Semiconductor Products Sector
7700 W. Parmer Lane, Austin, TX 78729
Loc/MD: TX32/PL30 _
email : nari@ibmoto.com / \ email: Narayanan.Krishnamurthy@motorola.com
Ph : (512) 996-4863 |O O| Fax : (512) 996-7432
************************| I |*********************************************
\ o /
---
^ permalink raw reply [flat|nested] 4+ messages in thread
* ocamlc command line suggested features
2000-05-22 23:56 Ocaml library implementing equivalence classes and partial orders nari
@ 2000-05-25 7:53 ` thierry BRAVIER
2000-05-29 12:09 ` Sven LUTHER
2000-05-30 0:50 ` Jacques Garrigue
0 siblings, 2 replies; 4+ messages in thread
From: thierry BRAVIER @ 2000-05-25 7:53 UTC (permalink / raw)
To: caml-list
Dear ocamlers,
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,
Remark 2: I would rather not hard code STDLIB since I have several versions of
ocaml available.
* 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.
Wouldn't it be nice if we could just say:
ocamlc -sig labltk.cma
to get the same output as with ocamlc -i
or maybe just use option -i itself as in:
ocamlc -i labltk.cma
That way it would not be necessary to ship libraries and .cmi files with
related .mli files
By the way, I am not a specialist of ocamlopt, what about this feature with
.cmxa files ?
Any comment ?
Cheers.
Thierry Bravier
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ocamlc command line suggested features
2000-05-25 7:53 ` ocamlc command line suggested features thierry BRAVIER
@ 2000-05-29 12:09 ` Sven LUTHER
2000-05-30 0:50 ` Jacques Garrigue
1 sibling, 0 replies; 4+ messages in thread
From: Sven LUTHER @ 2000-05-29 12:09 UTC (permalink / raw)
To: thierry BRAVIER; +Cc: caml-list
On Thu, May 25, 2000 at 09:53:15AM +0200, thierry BRAVIER wrote:
> Dear ocamlers,
>
> 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
you can already do it with this gmake definition :
OCAMLDIR = $(shell $(CAMLC) -v | grep Standard | sed -e "s/^.*: //")
or by shell script :
STDLIB=`ocamlc -v | grep Standard | sed -e "s/^.*: //"`
A better solution would be for ocamlc & co to search in the $STDLIB place as
well as in the current dir and absolute path, this way you could just write :
ocamlc -I labltk foo.ml
this would include $STDLIB/labltk.
Friendly,
Sven LUTHER
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ocamlc command line suggested features
2000-05-25 7:53 ` ocamlc command line suggested features thierry BRAVIER
2000-05-29 12:09 ` Sven LUTHER
@ 2000-05-30 0:50 ` Jacques Garrigue
1 sibling, 0 replies; 4+ messages in thread
From: Jacques Garrigue @ 2000-05-30 0:50 UTC (permalink / raw)
To: thierry.bravier; +Cc: caml-list
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.
Cheers,
Jacques
---------------------------------------------------------------------------
Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp
<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-05-30 20:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-22 23:56 Ocaml library implementing equivalence classes and partial orders nari
2000-05-25 7:53 ` ocamlc command line suggested features thierry BRAVIER
2000-05-29 12:09 ` Sven LUTHER
2000-05-30 0:50 ` Jacques Garrigue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox