@@ -30,7 +30,7 @@ import Idris.Core.Unify (match_unify)
3030import Idris.Delaborate (delabTy)
3131import Idris.Docstrings (noDocs, overview)
3232import Idris.Elab.Type (elabType)
33−import Idris.Output (iputStrLn, iRenderOutput, iPrintResult, iRenderResult, prettyDocumentedIst)
33+import Idris.Output (iputStrLn, iRenderOutput, iPrintResult, iRenderError, iRenderResult, prettyDocumentedIst)
3434import Idris.IBC
3535
3636import Prelude hiding (pred)
@@ -55,9 +55,13 @@ searchByType pkgs pterm = do
5555 displayScore theScore <> char ' ' <> prettyDocumentedIst i docInfo
5656 | (n, theScore) <- names']
5757 case idris_outputmode i of
58− RawOutput _ -> do mapM_ iRenderOutput docs
58+ RawOutput _ -> do if (not (null docs))
59+ then mapM_ iRenderOutput docs
60+ else iRenderError $ text "No results found"
5961 iPrintResult ""
60− IdeMode _ _ -> iRenderResult (vsep docs)
62+ IdeMode _ _ -> if (not (null docs))
63+ then iRenderResult (vsep docs)
64+ else iRenderError $ text "No results found"
6165 putIState i -- don't actually make any changes
6266 where
6367 numLimit = 50