The Wayback Machine - https://web.archive.org/web/20201021221610/https://github.com/ocaml/merlin/issues/1113
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`Not_found` during polarity search and missing documentation #1113

Open
arvidj opened this issue Mar 9, 2020 · 0 comments
Open

`Not_found` during polarity search and missing documentation #1113

arvidj opened this issue Mar 9, 2020 · 0 comments

Comments

@arvidj
Copy link

@arvidj arvidj commented Mar 9, 2020

I'm a OCaml beginner. I'm used to tools like Hoogle or Yahoo. I'm looking for a function of some type t. I'm hoping merlin can help me. I'm using Emacs. I try the command merlin-search. It is undocumented. I try any string, the response is:

Not_found
Raised at file \"src/ocaml/typing/407/ident.ml\", line 171, characters 6-21
Called from file \"src/ocaml/typing/407/env.ml\", line 281, characters 25-57
Re-raised at file \"src/ocaml/typing/407/env.ml\", line 301, characters 12-21
Called from file \"src/ocaml/typing/407/env.ml\" (inlined), line 1261, characters 2-57
Called from file \"src/ocaml/typing/407/env.ml\", line 1319, characters 26-56
Called from file \"src/analysis/polarity_search.ml\", line 83, characters 29-52
Called from file \"src/utils/std.ml\", line 109, characters 12-15
Called from file \"src/analysis/polarity_search.ml\", line 86, characters 17-62
Called from file \"src/frontend/query_commands.ml\", line 417, characters 6-125
Called from file \"src/frontend/ocamlmerlin/new/new_commands.ml\", line 64, characters 15-53
Called from file \"src/utils/std.ml\", line 679, characters 8-12
Re-raised at file \"src/utils/std.ml\", line 681, characters 30-39
Called from file \"src/ocaml/utils/misc.ml\", line 62, characters 8-15
Re-raised at file \"src/ocaml/utils/misc.ml\", line 79, characters 10-24
Called from file \"src/utils/local_store.ml\", line 42, characters 8-12
Re-raised at file \"src/utils/local_store.ml\", line 52, characters 4-15
Called from file \"src/kernel/mocaml.ml\", line 18, characters 8-38
Re-raised at file \"src/kernel/mocaml.ml\", line 20, characters 42-53
Called from file \"src/frontend/ocamlmerlin/new/new_merlin.ml\", line 100, characters 14-110

Okay. I'm trying to figure what merlin-search is should do. I see that it does something called "polarity search". I find the documenation :

### `search-by-polarity -position <position> -query <string>`

    -position <position>  Position to complete
         -query <string>  Query of the form TODO

search-by-polarity -position pos -query ident
        TODO

I'm none the wiser.

My Merlin version 3.3.3 :

ocamlmerlin -version
The Merlin toolkit version 73e9771b, for Ocaml 4.07.1

Suggestions:

  • fix the bug above
  • document search-by-polarity in the command-line client
  • document merlin-search in emacs
  • give usage examples somewhere explaining clearly what this command searches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.