elm-browser icon indicating copy to clipboard operation
elm-browser copied to clipboard

Idea: Add a search functionality

Open dawehner opened this issue 6 years ago • 1 comments

It would be super cool to have some form of search functionality:

  • Search by simple strings (which is I think what find does?)
  • Search by types (similiar to hoogle

dawehner avatar Aug 30 '19 07:08 dawehner

Name-based search is kind of possible (and kind of implemented) right now; when loading a branch we compute mappings from name-to-term and name-to-type: https://github.com/unisonweb/elm-browser/blob/f4d5cf05c6010f4b07796c3e089a62ac87fb286d/client-src/Unison/Codebase/Branch.elm#L59 https://github.com/unisonweb/elm-browser/blob/f4d5cf05c6010f4b07796c3e089a62ac87fb286d/client-src/Unison/Codebase/Branch.elm#L55

Then search is just a matter of creating sets from the keys in these maps, and filtering.

https://github.com/unisonweb/elm-browser/blob/f4d5cf05c6010f4b07796c3e089a62ac87fb286d/client-src/Ucb/Main/View.elm#L117-L130

mitchellwrosen avatar Aug 31 '19 16:08 mitchellwrosen