aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-05 16:22:10 +1000
committerYuchen Pei <hi@ypei.me>2022-09-05 16:22:10 +1000
commitde0447a69f58bbb55fd73cdc1e799c8e4705f128 (patch)
tree5ea07a54e6ff99712ce0bcf827934bd58f71ab64
parent764262f85b96646cf276c29e230c7ae4914d2e71 (diff)
fixing logic in hoogledocs lookup
-rw-r--r--app/Server.hs6
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 ""
_ ->