@@ -1,6 +1,6 @@
11{-# LANGUAGE DeriveFunctor, PatternGuards, MultiWayIf #-}
22{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
3−module Idris.Docs (pprintDocs, getDocs, pprintConstDocs, FunDoc, FunDoc'(..), Docs, Docs'(..)) where
3+module Idris.Docs (pprintDocs, getDocs, pprintConstDocs, pprintTypeDoc, FunDoc, FunDoc'(..), Docs, Docs'(..)) where
44
55import Idris.AbsSyntax
66import Idris.AbsSyntaxTree
@@ -317,3 +317,8 @@ pprintConstDocs ist c str = text "Primitive" <+> text (if constIsType c then "ty
317317 t (Str _) = PConstant NoFC StrType
318318 t (Ch c) = PConstant NoFC $ AType (ATInt ITChar)
319319 t _ = PType NoFC
320+
321+
322+pprintTypeDoc :: IState -> Doc OutputAnnotation
323+pprintTypeDoc ist = prettyIst ist (PType emptyFC) <+> colon <+> type1Doc <+>
324+ nest 4 (line <> text typeDescription)