@@ -1130,10 +1130,12 @@ instance Pretty PTerm OutputAnnotation where
11301130-- terminal.
11311131consoleDecorate :: IState -> OutputAnnotation -> String -> String
11321132consoleDecorate ist _ | not (idris_colourRepl ist) = id
1133−consoleDecorate ist AnnConstData = let theme = idris_colourTheme ist
1134− in colouriseData theme
1135−consoleDecorate ist AnnConstType = let theme = idris_colourTheme ist
1136− in colouriseType theme
1133+consoleDecorate ist (AnnConst c) = let theme = idris_colourTheme ist
1134+ in if constIsType c
1135+ then colouriseType theme
1136+ else colouriseData theme
1137+consoleDecorate ist (AnnData _ _) = colouriseData (idris_colourTheme ist)
1138+consoleDecorate ist (AnnType _ _) = colouriseType (idris_colourTheme ist)
11371139consoleDecorate ist (AnnBoundName _ True) = colouriseImplicit (idris_colourTheme ist)
11381140consoleDecorate ist (AnnBoundName _ False) = colouriseBound (idris_colourTheme ist)
11391141consoleDecorate ist AnnKeyword = colouriseKeyword (idris_colourTheme ist)
@@ -1175,7 +1177,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe 10 bnd
11751177 prettySe p bnd (PPatvar fc n) = pretty n
11761178 prettySe p bnd e
11771179 | Just str <- slist p bnd e = str
1178− | Just n <- snat p e = annotate AnnConstData (text (show n))
1180+ | Just n <- snat p e = annotate (AnnData "Nat" "") (text (show n))
11791181 prettySe p bnd (PRef fc n) = prettyName (ppopt_impl ppo) bnd n
11801182 prettySe p bnd (PLam n ty sc) =
11811183 bracket p 2 . group . align . hang 2 $
@@ -1251,7 +1253,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe 10 bnd
12511253 (left l <+> opName) <$> group (right r)
12521254 prettySe p bnd (PApp _ hd@(PRef fc f) [tm]) -- symbols, like 'foo
12531255 | PConstant (Idris.Core.TT.Str str) <- getTm tm,
1254− f == sUN "Symbol_" = annotate AnnConstType $
1256+ f == sUN "Symbol_" = annotate (AnnType ("'" ++ str) ("The symbol " ++ str)) $
12551257 char '\'' <> prettySe 10 bnd (PRef fc (sUN str))
12561258 prettySe p bnd (PApp _ f as) = -- Normal prefix applications
12571259 let args = getExps as
@@ -1320,13 +1322,8 @@ pprintPTerm ppo bnd docArgs infixes = prettySe 10 bnd
13201322 where
13211323 prettyAs =
13221324 foldr (\l -> \r -> l <+> text "," <+> r) empty $ map (prettySe 10 bnd) as
1323− prettySe p bnd PType = annotate AnnConstType $ text "Type"
1324− prettySe p bnd (PConstant c) = annotate (annot c) (text (show c))
1325− where annot (AType _) = AnnConstType
1326− annot StrType = AnnConstType
1327− annot PtrType = AnnConstType
1328− annot VoidType = AnnConstType
1329− annot _ = AnnConstData
1325+ prettySe p bnd PType = annotate (AnnType "Type" "The type of types") $ text "Type"
1326+ prettySe p bnd (PConstant c) = annotate (AnnConst c) (text (show c))
13301327 -- XXX: add pretty for tactics
13311328 prettySe p bnd (PProof ts) =
13321329 text "proof" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
@@ -1378,16 +1375,16 @@ pprintPTerm ppo bnd docArgs infixes = prettySe 10 bnd
13781375 slist' _ _ tm = Nothing
13791376
13801377 slist p bnd e | Just es <- slist' p bnd e = Just $
1381− case es of [] -> annotate AnnConstData $ text "[]"
1378+ case es of [] -> annotate (AnnData "" "") $ text "[]"
13821379 [x] -> enclose left right . group $
13831380 prettySe p bnd x
13841381 xs -> (enclose left right .
13851382 align . group . vsep .
13861383 punctuate comma .
13871384 map (prettySe p bnd)) xs
1388− where left = (annotate AnnConstData (text "["))
1389− right = (annotate AnnConstData (text "]"))
1390− comma = (annotate AnnConstData (text ","))
1385+ where left = (annotate (AnnData "" "") (text "["))
1386+ right = (annotate (AnnData "" "") (text "]"))
1387+ comma = (annotate (AnnData "" "") (text ","))
13911388 slist _ _ _ = Nothing
13921389
13931390 pairElts :: PTerm -> Maybe [PTerm]