camlspotter / ocamloscope.2

OCamlOScope 2 : OCaml API search
42 stars 1 forks source link

Search by `concat` displays `{stdlib}.List.flatten` but without its type. #25

Open camlspotter opened 7 years ago

camlspotter commented 7 years ago

Currently the aliases are stored just by their names. When searched by concat, List.flatten is not hit, but many list concat functions are aliases of it. Since the search results only tells the name of the alias without type, the type of List.flatten is not displayed.

The ideal is to display List.flatten with its type, but in general, it may be difficult within the current implementation of alias analysis: generally speaking, M.x in aliases may not be M.x which is accessible outside of M. For example:

(* module M *)
let x = 1
let y = x
let x = 3

M.y is an alias of the first M.x, but M.x accessible outside of this module is the second M.x.