Skip to content

Find identifiers across packages #20

Description

@gelisam

Haskell-code-explorer is great for exploring a particular definition, but finding that definition is a bit more difficult than it should be, because I need to know in which package it is defined before I can use the identifier search to find that definition by name. Would it be possible to select more than one packages in which to search? Or perhaps, if I search for an identifier and find 0 results, offer the option to search in all other indexed packages?

Activity

  1. alexwl commented on Feb 5, 2019

    @alexwl
    Owner

    finding that definition is a bit more difficult than it should be, because I need to know in which package it is defined before I can use the identifier search

    I completely agree that it is inconvenient. "Global" identifier search would be helpful.

    Would it be possible to select more than one packages in which to search? Or perhaps, if I search for an identifier and find 0 results, offer the option to search in all other indexed packages?

    It is possible (and not too difficult).

    I think it is best to add an option to search in all indexed packages. The "global" identifier search form should be accessible from both main page (next to the package search form) and package page (I will add a radio button "in the current package"/"in all packages" next to the identifier search form).

    The plan is:

    1. Add a trie with exported identifiers from all indexed packages to Environment of haskell-code-server, add a new API endpoint.
    2. Create UI for "global" identifier search (form on the main page and a list of found identifiers).
    3. Add an option to switch between "search in the current package" and "search in all packages" on the package page.
  2. self-assigned this
    on Feb 5, 2019
  3. alexwl commented on Feb 8, 2019

    @alexwl
    Owner

    Features 1. and 2. are in master now. There is a "Search in all packages" form on the main page, demo: https://haskell-code-explorer.mfix.io/

    The switch between "search in the current package" and "search in all packages" on the package page is not done yet.

  4. alexwl commented on Feb 15, 2019

    @alexwl
    Owner

    e8ded03 implements the switch on the package page. Demo: https://haskell-code-explorer.mfix.io/package/lens-4.16.1

  5. gelisam commented on Feb 17, 2019

    @gelisam
    Author

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions