Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Idea: Add a search functionality #12

Open
dawehner opened this issue Aug 30, 2019 · 1 comment
Open

Idea: Add a search functionality #12

dawehner opened this issue Aug 30, 2019 · 1 comment

Comments

@dawehner
Copy link
Contributor

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
@mitchellwrosen
Copy link
Member

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:

, nameToType : NameDict ReferenceSet

, nameToTerm : NameDict ReferentSet

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

column
[]
[ text "Hi, I'm your friendly neighborhood search box"
, text "While I look great just the way I am, we are excited for colorful UI improvements coming soon!"
, text "Anywho please give me a spin!"
, Element.Input.text
[]
{ onChange = User_Search
, text = model.ui.search
, placeholder = Nothing
, label = labelLeft [] (text "Search")
}
, column [] (List.map text matching)
]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants