diff --git a/unison-share-api/src/Unison/Server/Backend.hs b/unison-share-api/src/Unison/Server/Backend.hs index e719281a23..0064237687 100644 --- a/unison-share-api/src/Unison/Server/Backend.hs +++ b/unison-share-api/src/Unison/Server/Backend.hs @@ -996,14 +996,15 @@ evalDocRef rt codebase r = do docsForDefinitionName :: Codebase IO Symbol Ann -> NameSearch Sqlite.Transaction -> + NamesWithHistory.SearchType -> Name -> IO [TermReference] -docsForDefinitionName codebase (NameSearch {termSearch}) name = do +docsForDefinitionName codebase (NameSearch {termSearch}) searchType name = do let potentialDocNames = [name, name Cons.:> "doc"] Codebase.runTransaction codebase do refs <- potentialDocNames & foldMapM \name -> - lookupRelativeHQRefs' termSearch NamesWithHistory.ExactName (HQ'.NameOnly name) + lookupRelativeHQRefs' termSearch searchType (HQ'.NameOnly name) filterForDocs (toList refs) where filterForDocs :: [Referent] -> Sqlite.Transaction [TermReference] diff --git a/unison-share-api/src/Unison/Server/Local/Definitions.hs b/unison-share-api/src/Unison/Server/Local/Definitions.hs index 9abd81486f..2b7f03736a 100644 --- a/unison-share-api/src/Unison/Server/Local/Definitions.hs +++ b/unison-share-api/src/Unison/Server/Local/Definitions.hs @@ -70,7 +70,7 @@ prettyDefinitionsForHQName perspective shallowRoot renderWidth suffixifyBindings let width = mayDefaultWidth renderWidth let docResults :: Name -> IO [(HashQualifiedName, UnisonHash, Doc.Doc)] docResults name = do - docRefs <- docsForDefinitionName codebase nameSearch name + docRefs <- docsForDefinitionName codebase nameSearch NamesWithHistory.ExactName name renderDocRefs pped width codebase rt docRefs let fqnPPE = PPED.unsuffixifiedPPE pped