Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Hoogle for Ocaml

5 views
Skip to first unread message

Matthias Görgens

unread,
Dec 3, 2009, 11:08:37 AM12/3/09
to caml...@yquem.inria.fr
Hi,

Is there an equivalent to Haskell's Hoogle for Ocaml?

Matthias.

_______________________________________________
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

Tom Hutchinson

unread,
Dec 3, 2009, 11:31:48 AM12/3/09
to Matthias Görgens, caml...@yquem.inria.fr
This might be what you're looking for:

http://docs.camlcity.org/docs/index.html

You can search through the files in all of the GODI packages. It's not
just function names and type signatures so you might get more results
than you want.

Tom

ri...@happyleptic.org

unread,
Dec 3, 2009, 11:51:19 AM12/3/09
to caml...@yquem.inria.fr
> Not really .. I have been meaning for several years to implement
> something like *CPAN* for OCaml. CPAN is much more than what people
> here seem to think it is.

Out of curiosity, what's in CPAN that's not in GODI ?

Richard Jones

unread,
Dec 3, 2009, 1:00:46 PM12/3/09
to ri...@happyleptic.org, caml...@yquem.inria.fr
On Thu, Dec 03, 2009 at 05:51:00PM +0100, ri...@happyleptic.org wrote:
> > Not really .. I have been meaning for several years to implement
> > something like *CPAN* for OCaml. CPAN is much more than what people
> > here seem to think it is.
>
> Out of curiosity, what's in CPAN that's not in GODI ?

OK, I knew I'd have to answer this question :-)

CPAN is:

(1) A network of redundant mirrors which means you can always get the
tarball you need, even when the original site is down:

http://mirrors.geoexpat.com/cpan/authors/id/R/RW/RWMJ/
http://mirror.unej.ac.id/cpan/authors/id/R/RW/RWMJ/
http://mirrors.ucr.ac.cr/CPAN/authors/id/R/RW/RWMJ/
(more: http://search.cpan.org/mirror)

(2) CPAN unpacks each tarball and makes the source and documentation
available in a browsable way:

http://search.cpan.org/~rwmj/Net-FTPServer-1.122/lib/Net/FTPServer.pm
http://cpansearch.perl.org/src/RWMJ/Net-FTPServer-1.122/lib/Net/FTPServer.pm

(3) An excellent search tool:

http://search.cpan.org/search?query=IO%3A%3Astringy&mode=all

(4) A central namespace registry for Perl modules. Once someone has
the name 'Net::FTPServer', if you want to write an FTP server, you
know you need to give it a different name.

(5) A testing network. When you submit a new version of your module,
it is picked up by automated and manual testers around the world, who
build and test it on their systems (often oddball ones - eg. I get
reports about it failing to build on SunOS and AIX).

(6) A place where you can browse everything that Perl supports:

http://www.cpan.org/modules/by-module/
http://www.cpan.org/modules/01modules.index.html

Which is great advertising for Perl, because you can immediately
see the breadth of available libraries for Perl.

(7) A command line tool to download and install CPAN modules:

http://search.cpan.org/~andk/CPAN-1.9402/lib/CPAN.pm#DESCRIPTION

-- Note what CPAN is *not*:

It's not a packaging system. Perl has its own packaging standard(s)
(like cabal for Haskell), but CPAN doesn't care. It hosts source
tarballs.

It doesn't store binaries.

It's not strongly centralized. Actually, it's very loose indeed.
Although there is a central place where you upload modules, they are
very loose about naming, content, licensing etc. (within limits of
course).

--

> Out of curiosity, what's in CPAN that's not in GODI ?

I think that Gerd Stolpmann has (to his credit) done a lot of the work
that CPAN does, but I also think it should be on a firmer footing,
mirrored more widely, the search tools should be linked from the OCaml
home page, and not tied to building modules, but to hosting source
tarballs. And more inclusive - it should include *every* source
tarball -- as much OCaml source as possible.

Rich.

--
Richard Jones
Red Hat

Matthias Görgens

unread,
Dec 3, 2009, 1:46:07 PM12/3/09
to Tom Hutchinson, caml...@yquem.inria.fr
> This might be what you're looking for:
> http://docs.camlcity.org/docs/index.html

Thanks. I'll try it. Does it support e.g. searching for "(a->b) ->
[a] -> [b]" and spitting out List.map?

Gerd Stolpmann

unread,
Dec 3, 2009, 2:18:14 PM12/3/09
to Matthias Görgens, caml...@yquem.inria.fr, Tom Hutchinson

Am Donnerstag, den 03.12.2009, 18:45 +0000 schrieb Matthias Görgens:
> > This might be what you're looking for:
> > http://docs.camlcity.org/docs/index.html
>
> Thanks. I'll try it. Does it support e.g. searching for "(a->b) ->
> [a] -> [b]" and spitting out List.map?

There is no search for type expressions.

Here is the query syntax: http://docs.camlcity.org/docs/syntax.html

Gerd
--
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany
ge...@gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------

Gerd Stolpmann

unread,
Dec 3, 2009, 2:35:45 PM12/3/09
to Richard Jones, caml...@yquem.inria.fr

Yes, nice goals - but hard to achieve if you only have limited
resources. Also, don't forget that Perl attracted a lot of sysadmins,
and for them it is a lot of fun to create something like CPAN. For the
typical Ocaml developer it is scripting hell. Finally, there is the
question of creating "normative pressure" so sources have some formal
uniformity - normal for sysadmins, but a no-go for the creative
ocamlists.

I'd say it is a different project than GODI to make sources available,
browsable and searchable. There's some overlap, though.

Gerd
--
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany
ge...@gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------

_______________________________________________

ri...@happyleptic.org

unread,
Dec 3, 2009, 4:21:53 PM12/3/09
to caml...@yquem.inria.fr
> > (1) A network of redundant mirrors which means you can always get the
> > tarball you need, even when the original site is down:

If I understand correctly, GODI site does not store any of the source
tarballs, but the makefiles download the sources directly from their
respective home, does it ? Can't we use the MASTER_SITE_BACKUP make
variables to have one or several backup sites ?

If it's usefull I can try to setup a server to download every possible
source tarballs and serve as such a site backup.

But would it be usefull ?

> > (2) CPAN unpacks each tarball and makes the source and documentation
> > available in a browsable way:

Why is it any better than something like that :

http://docs.camlcity.org/docs/godipkg/3.10/godi-frontc/doc/godi-frontc/html/Ctoxml.html

> > (3) An excellent search tool:

Ok.

> > (4) A central namespace registry for Perl modules. Once someone has
> > the name 'Net::FTPServer', if you want to write an FTP server, you
> > know you need to give it a different name.

Ok ; unfortunately no such authority is required to name the few
(compared to perl) ocaml libraries.

> > (5) A testing network.


> > (6) A place where you can browse everything that Perl supports:

That would be nice to have in Godi as well.

> > (7) A command line tool to download and install CPAN modules:

I like godi_console (despite laking fancy colors :-), although I'd
like a simpler command line tool to be available as well.

Sylvain Le Gall

unread,
Dec 3, 2009, 7:58:09 PM12/3/09
to caml...@inria.fr
On 03-12-2009, ri...@happyleptic.org <ri...@happyleptic.org> wrote:
>> > (1) A network of redundant mirrors which means you can always get the
>> > tarball you need, even when the original site is down:
>
> If I understand correctly, GODI site does not store any of the source
> tarballs, but the makefiles download the sources directly from their
> respective home, does it ? Can't we use the MASTER_SITE_BACKUP make
> variables to have one or several backup sites ?
>
> If it's usefull I can try to setup a server to download every possible
> source tarballs and serve as such a site backup.
>
> But would it be usefull ?
>

Yes of course. You can use ocamlcore.org website to do that. I have
already a proof of concept using "uscan" + Debian watch file, to scan
for new upstream on a weekly basis.

Send me a private mail, if you want to proceed.

Once the website is setup, we can use "rsync" to propagate it
(ssh.ocamlcore.org has rsync installed).

Everything is ready on *.ocamlcore.org, we just need some volunteer to
do the work.

Regards,
Sylvain Le Gall

Philippe Veber

unread,
Dec 4, 2009, 4:42:32 AM12/4/09
to ri...@happyleptic.org, caml...@yquem.inria.fr
> > > (7) A command line tool to download and install CPAN modules:
>
> I like godi_console (despite laking fancy colors :-), although I'd
> like a simpler command line tool to be available as well.
>

In case you don't know it, you can install packages on command-line very
easily :

godi_perform -build godi-extlib

There's a more elaborated way using wish lists, which I personnaly never use
(but that may be wrong).
ph.

Gerd Stolpmann

unread,
Dec 4, 2009, 5:07:52 AM12/4/09
to ri...@happyleptic.org, caml...@yquem.inria.fr

Am Donnerstag, den 03.12.2009, 21:21 +0000 schrieb
ri...@happyleptic.org:

> > > (1) A network of redundant mirrors which means you can always get the
> > > tarball you need, even when the original site is down:
>
> If I understand correctly, GODI site does not store any of the source
> tarballs, but the makefiles download the sources directly from their
> respective home, does it ? Can't we use the MASTER_SITE_BACKUP make
> variables to have one or several backup sites ?

There are backups, e.g. http://godi-backup2.camlcity.org/


> > > (3) An excellent search tool:

What's wrong with GODI search? (Other than that it isn't comprehensive.)

>
> Ok.
>
> > > (4) A central namespace registry for Perl modules. Once someone has
> > > the name 'Net::FTPServer', if you want to write an FTP server, you
> > > know you need to give it a different name.
>
> Ok ; unfortunately no such authority is required to name the few
> (compared to perl) ocaml libraries.
>
> > > (5) A testing network.
> > > (6) A place where you can browse everything that Perl supports:
>
> That would be nice to have in Godi as well.
>
> > > (7) A command line tool to download and install CPAN modules:
>
> I like godi_console (despite laking fancy colors :-), although I'd
> like a simpler command line tool to be available as well.

You can also use godi_console as command-line tool, try godi_console
-help.

Gerd
--
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany
ge...@gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------

_______________________________________________

fo...@x9c.fr

unread,
Dec 4, 2009, 9:12:52 AM12/4/09
to caml...@yquem.inria.fr

Le 3 d�c. 2009 � 17:08, Matthias G�rgens a �crit :

> Hi,
>
> Is there an equivalent to Haskell's Hoogle for Ocaml?

There was a tool along those lines for CamlLight (but it seems to be broken):
http://www.dicosmo.org/TESTS/ENGLISH/CamlSearchCGI.english.html

You should also notice that the search box of OCamlBrowser accepts queries
like "int -> float", returning :
- Pervasives.float : int -> float
- Pervasives.float_of_int : int -> float
- Pervasives.ldexp : float -> int -> float


Hope this helps,

Xavier Clerc

0 new messages