@@ -490,12 +490,23 @@ runIdeModeCommand h id orig fn modes (IdeMode.BrowseNS ns) =
490490 if null underNSs && null names
491491 then iPrintError "Invalid or empty namespace"
492492 else do ist <- getIState
493− let msg = (IdeMode.SymbolAtom "ok", (underNSs, map (pn ist) names))
493+ underNs <- mapM pn names
494+ let msg = (IdeMode.SymbolAtom "ok", (underNSs, underNs))
494495 runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
495− where pn ist = displaySpans .
496− renderPretty 0.9 1000 .
497− fmap (fancifyAnnots ist True) .
498− prettyName True True []
496+ where pn n =
497+ do ctxt <- getContext
498+ ist <- getIState
499+ return $
500+ displaySpans .
501+ renderPretty 0.9 1000 .
502+ fmap (fancifyAnnots ist True) $
503+ prettyName True False [] n <>
504+ case lookupTyExact n ctxt of
505+ Just t ->
506+ space <> colon <> space <> align (group (pprintDelab ist t))
507+ Nothing ->
508+ empty
509+
499510runIdeModeCommand h id orig fn modes (IdeMode.TermNormalise bnd tm) =
500511 do ctxt <- getContext
501512 ist <- getIState