unison-share-api-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Server.NameSearch

Synopsis

Documentation

data Search m r Source #

A Search r is a small bag of functions that is used to power a search for rs.

There are currently two implementations of this interface:

  • FromNames which builds a name search from a Names object
  • 'NameSearch.Sqlite which builds a name search that uses a sqlite name lookup index.

You can use the individual methods of a name search or can use applySearch.

hoistSearch :: (forall x. m x -> n x) -> Search m r -> Search n r Source #

hoistNameSearch :: (forall x. m x -> n x) -> NameSearch m -> NameSearch n Source #

applySearch :: (Show r, Monad m) => Search m r -> SearchType -> HashQualified Name -> m [SearchResult] Source #

Interpret a Search as a function from name to search results.

data SearchType #

Whether to search for exact matches or to find definitions by a suffix of their name.

Constructors

IncludeSuffixes 
ExactName