on master help sign in
cleaned up redundant 'if'
commitd89af9c67e883dc6fbd1661963c6bb66af4d27a6 authorJP Smith <jp.smith@ilstu.edu> dateThu 2 Apr 2015, 15:37 (12 years ago) parent5f0dbd7
1 file changed+6−8
src/Idris/TypeSearch.hs+6−8
src/Idris/TypeSearch.hs+6−8
@@ -54,14 +54,12 @@ searchByType pkgs pterm = do
5454 [ let docInfo = (n, delabTy i n, fmap (overview . fst) (lookupCtxtExact n (idris_docstrings i))) in
5555 displayScore theScore <> char ' ' <> prettyDocumentedIst i docInfo
5656 | (n, theScore) <- names']
57− case idris_outputmode i of
58− RawOutput _ -> do if (not (null docs))
59− then mapM_ iRenderOutput docs
60− else iRenderError $ text "No results found"
61− iPrintResult ""
62− IdeMode _ _ -> if (not (null docs))
63− then iRenderResult (vsep docs)
64− else iRenderError $ text "No results found"
57+ if (not (null docs))
58+ then case idris_outputmode i of
59+ RawOutput _ -> do mapM_ iRenderOutput docs
60+ iPrintResult ""
61+ IdeMode _ _ -> iRenderResult (vsep docs)
62+ else iRenderError $ text "No results found"
6563 putIState i -- don't actually make any changes
6664 where
6765 numLimit = 50