Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 2fce6b5

Browse files
committed
Fix grammar
1 parent 8aeafb9 commit 2fce6b5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Haskell/Ide/Engine/Plugin/Hoogle.hs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ instance ExtensionClass HoogleDb where
6565
--
6666
-- If no hoogle database has been found, Nothing is returned
6767
-- and we will have no access to the hoogle database.
68+
-- However, it is still safe to use the hoogle API,
69+
-- e.g. either error or default values are returned.
6870
initializeHoogleDb :: IdeGhcM (Maybe FilePath)
6971
initializeHoogleDb = do
7072
explicitDbLocation <- liftIO $ lookupEnv "HIE_HOOGLE_DATABASE"
@@ -138,16 +140,16 @@ renderTarget t = T.intercalate "\n\n" $
138140
-- | Search for modules that satisfy the given search text.
139141
-- Will return at most five, unique results.
140142
--
141-
-- If an error happens, such as no has been hoogle database found,
142-
-- an empty list will be returned.
143+
-- If an error occurs, such as no hoogle database has been found,
144+
-- or the search term has no match, an empty list will be returned.
143145
searchModules :: T.Text -> IdeM [T.Text]
144146
searchModules = fmap (nub . take 5) . searchTargets (fmap (T.pack . fst) . targetModule)
145147

146148
-- | Search for packages that satisfy the given search text.
147149
-- Will return at most five, unique results.
148150
--
149-
-- If an error happens, such as no has been hoogle database found,
150-
-- an empty list will be returned.
151+
-- If an error occurs, such as no hoogle database has been found,
152+
-- or the search term has no match, an empty list will be returned.
151153
searchPackages :: T.Text -> IdeM [T.Text]
152154
searchPackages = fmap (nub . take 5) . searchTargets (fmap (T.pack . fst) . targetPackage)
153155

@@ -157,8 +159,8 @@ searchPackages = fmap (nub . take 5) . searchTargets (fmap (T.pack . fst) . targ
157159
-- although there are matches, if none of the first ten matches
158160
-- satisfies the predicate.
159161
--
160-
-- If an error happens, such as no hoogle database found,
161-
-- an empty list will be returned.
162+
-- If an error occurs, such as no hoogle database has been found,
163+
-- or the search term has no match, an empty list will be returned.
162164
searchTargets :: (Target -> Maybe a) -> T.Text -> IdeM [a]
163165
searchTargets f term = do
164166
HoogleDb mdb <- get

0 commit comments

Comments
 (0)