@@ -941,23 +941,22 @@ process fn (Core t)
941941 iPrintTermWithType (pprintTT [] tm) (pprintTT [] ty)
942942
943943process fn (DocStr (Left n) w)
944− = do ist <- getIState
945− let txtType = txt "Type"
946− case n of
947− (UN txtType) -> iRenderResult $ pprintTypeDoc ist
948− _ -> do let docs = lookupCtxtName n (idris_docstrings ist) ++
949− map (\(n,d)-> (n, (d, [])))
950− (lookupCtxtName (modDocN n) (idris_moduledocs ist))
951− case docs of
952− [] -> iPrintError $ "No documentation for " ++ show n
953− ns -> do toShow <- mapM (showDoc ist) ns
954− iRenderResult (vsep toShow)
955− where showDoc ist (n, d) = do doc <- getDocs n w
956− return $ pprintDocs ist doc
957−
958− modDocN (NS (UN n) ns) = NS modDocName (n:ns)
959− modDocN (UN n) = NS modDocName [n]
960− modDocN _ = sMN 1 "NotFoundForSure"
944+ | UN ty <- n, ty == T.pack "Type" = getIState >>= iRenderResult . pprintTypeDoc
945+ | otherwise = do
946+ ist <- getIState
947+ let docs = lookupCtxtName n (idris_docstrings ist) ++
948+ map (\(n,d)-> (n, (d, [])))
949+ (lookupCtxtName (modDocN n) (idris_moduledocs ist))
950+ case docs of
951+ [] -> iPrintError $ "No documentation for " ++ show n
952+ ns -> do toShow <- mapM (showDoc ist) ns
953+ iRenderResult (vsep toShow)
954+ where showDoc ist (n, d) = do doc <- getDocs n w
955+ return $ pprintDocs ist doc
956+
957+ modDocN (NS (UN n) ns) = NS modDocName (n:ns)
958+ modDocN (UN n) = NS modDocName [n]
959+ modDocN _ = sMN 1 "NotFoundForSure"
961960
962961process fn (DocStr (Right c) _) -- constants only have overviews
963962 = do ist <- getIState