Daniel Bünzli <[email protected]> a écrit :

(...)


The searching tools are quite limited currently,

To me the search tools are not so useful. Usually I know in which
module I want to lookup a function. To get there quickly I use my OS
file search --- thanks to ocamldoc generating one file per module ---
and then the incremental search of my browser. Of course this is quite
different of indexing e.g. the symbols directly but it works well in
practice.

Well, regarding search by name, I consider that the only advantages upon
browser search are:
  - simultaneous search on several pages;
  - regular expression search (although some browser may support it).


(...)

Regarding search by type, I wonder if people actually use this for
useful reasons or if it's just out of curiosity or for the cool hack
factor -- and sure it's cool. I mean there's not enough semantics in
types to tell you what a function will do, and since we curry it is
not always clear in which order we will argument.

To be clear, I implemented search by type in order to understand a bit
more the book of Roberto Di Cosmo about type isomorphisms. Whether it
can be a useful tool remains to be determined. The tool now exists,
let's see if there is a usage for it.

I do agree that there is often not enough semantics in OCaml types, but
please notice that the order of arguments and whether the function is
currified is not relevant. Indeed, doing type search up to isomorphisms
allows to get rid of these details, all of the following queries will
answer with "String.sub":
  - "int -> int -> string -> string"
  - "string -> (int * int) -> string"
  - "string * int *int -> string"
while the actual signature is "string -> int -> int -> string".


Regards,

Xavier Clerc



--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to