diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Server.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Server.hs b/app/Server.hs index 369221a..557459f 100644 --- a/app/Server.hs +++ b/app/Server.hs @@ -1532,11 +1532,11 @@ getHoogleDocs packageId (HCE.HaskellModuleName moduleName) itemSort name A.Array vector -> let items = mapMaybe valueToHoogleResultItem $ V.toList vector findItem :: Bool -> [HoogleResultItem] -> Maybe HoogleResultItem - findItem exactModuleMatch = + findItem laxModuleMatch = L.find (\HoogleResultItem {sort = s, moduleName = m} -> - s == itemSort && (exactModuleMatch || m == moduleName)) - in case findItem True items <|> findItem False items of + s == itemSort && (laxModuleMatch || m == moduleName)) + in case findItem False items <|> findItem True items of Just item -> return $ htmlDocs item _ -> error404 "" _ -> |