@@ -1067,6 +1067,7 @@ consoleDecorate ist AnnConstType = let theme = idris_colourTheme ist
1067 in colouriseType theme
1067 in colouriseType theme
1068consoleDecorate ist (AnnBoundName _ True) = colouriseImplicit (idris_colourTheme ist)
1068consoleDecorate ist (AnnBoundName _ True) = colouriseImplicit (idris_colourTheme ist)
1069consoleDecorate ist (AnnBoundName _ False) = colouriseBound (idris_colourTheme ist)
1069consoleDecorate ist (AnnBoundName _ False) = colouriseBound (idris_colourTheme ist)
1070+consoleDecorate ist AnnKeyword = colouriseKeyword (idris_colourTheme ist)
1070consoleDecorate ist (AnnName n _ _) = let ctxt = tt_ctxt ist
1071consoleDecorate ist (AnnName n _ _) = let ctxt = tt_ctxt ist
1071 theme = idris_colourTheme ist
1072 theme = idris_colourTheme ist
1072 in case () of
1073 in case () of
@@ -1103,8 +1104,8 @@ pprintPTerm impl bnd = prettySe 10 bnd
1103 prettySe 10 ((n, False):bnd) sc
1104 prettySe 10 ((n, False):bnd) sc
1104 prettySe p bnd (PLet n ty v sc) =
1105 prettySe p bnd (PLet n ty v sc) =
1105 bracket p 2 $
1106 bracket p 2 $
1106− text "let" <+> bindingOf n False <+> text "=" </>
1107+ kwd "let" <+> bindingOf n False <+> text "=" </>
1107− prettySe 10 bnd v <+> text "in" </>
1108+ prettySe 10 bnd v <+> kwd "in" </>
1108 prettySe 10 ((n, False):bnd) sc
1109 prettySe 10 ((n, False):bnd) sc
1109 prettySe p bnd (PPi (Exp l s _) n ty sc)
1110 prettySe p bnd (PPi (Exp l s _) n ty sc)
1110 | n `elem` allNamesIn sc || impl =
1111 | n `elem` allNamesIn sc || impl =
@@ -1137,7 +1138,7 @@ pprintPTerm impl bnd = prettySe 10 bnd
1137 prettySe 10 bnd ty <+> text "=>" </> prettySe 10 ((n, True):bnd) sc
1138 prettySe 10 bnd ty <+> text "=>" </> prettySe 10 ((n, True):bnd) sc
1138 prettySe p bnd (PPi (TacImp _ _ s) n ty sc) =
1139 prettySe p bnd (PPi (TacImp _ _ s) n ty sc) =
1139 bracket p 2 $
1140 bracket p 2 $
1140− lbrace <> text "tacimp" <+> pretty n <+> colon <+> prettySe 10 bnd ty <>
1141+ lbrace <> kwd "tacimp" <+> pretty n <+> colon <+> prettySe 10 bnd ty <>
1141 rbrace <+> text "->" </> prettySe 10 ((n, True):bnd) sc
1142 rbrace <+> text "->" </> prettySe 10 ((n, True):bnd) sc
1142 prettySe p bnd (PApp _ (PRef _ f) args) -- normal names, no explicit args
1143 prettySe p bnd (PApp _ (PRef _ f) args) -- normal names, no explicit args
1143 | UN nm <- basename f
1144 | UN nm <- basename f
@@ -1177,7 +1178,7 @@ pprintPTerm impl bnd = prettySe 10 bnd
1178 else fp <+> align (vsep (map (prettyArgSe bnd) args))
1179 else fp <+> align (vsep (map (prettyArgSe bnd) args))
1179 prettySe p bnd (PCase _ scr opts) =
1180 prettySe p bnd (PCase _ scr opts) =
1180− text "case" <+> prettySe 10 bnd scr <+> text "of" <> prettyBody
1181+ kwd "case" <+> prettySe 10 bnd scr <+> kwd "of" <> prettyBody
1182 prettyBody = foldr (<>) empty $ intersperse (text "|") $ map sc opts
1183 prettyBody = foldr (<>) empty $ intersperse (text "|") $ map sc opts
@@ -1244,8 +1245,8 @@ pprintPTerm impl bnd = prettySe 10 bnd
1244 prettySe p bnd (PTactics ts) =
1245 prettySe p bnd (PTactics ts) =
1245 text "tactics" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
1246 text "tactics" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
1246 prettySe p bnd (PMetavar n) = text "?" <> pretty n
1247 prettySe p bnd (PMetavar n) = text "?" <> pretty n
1247− prettySe p bnd (PReturn f) = text "return"
1248+ prettySe p bnd (PReturn f) = kwd "return"
1248− prettySe p bnd PImpossible = text "impossible"
1249+ prettySe p bnd PImpossible = kwd "impossible"
1249 prettySe p bnd Placeholder = text "_"
1250 prettySe p bnd Placeholder = text "_"
1250 prettySe p bnd (PDoBlock _) = text "do block pretty not implemented"
1251 prettySe p bnd (PDoBlock _) = text "do block pretty not implemented"
1251 prettySe p bnd (PElabError s) = pretty s
1252 prettySe p bnd (PElabError s) = pretty s
@@ -1260,7 +1261,7 @@ pprintPTerm impl bnd = prettySe 10 bnd
1260 prettyArgSe bnd arg = prettySe 0 bnd arg
1261 prettyArgSe bnd arg = prettySe 0 bnd arg
1261 prettyArgSi bnd (n, val) = lbrace <> pretty n <+> text "=" <+> prettySe 10 bnd val <> rbrace
1262 prettyArgSi bnd (n, val) = lbrace <> pretty n <+> text "=" <+> prettySe 10 bnd val <> rbrace
1262 prettyArgSc bnd val = lbrace <> lbrace <> prettySe 10 bnd val <> rbrace <> rbrace
1263 prettyArgSc bnd val = lbrace <> lbrace <> prettySe 10 bnd val <> rbrace <> rbrace
1263− prettyArgSti bnd (n, val) = lbrace <> text "auto" <+> pretty n <+> text "=" <+> prettySe 10 bnd val <> rbrace
1264+ prettyArgSti bnd (n, val) = lbrace <> kwd "auto" <+> pretty n <+> text "=" <+> prettySe 10 bnd val <> rbrace
1265 basename :: Name -> Name
1266 basename :: Name -> Name
1266 basename (NS n _) = basename n
1267 basename (NS n _) = basename n
@@ -1313,6 +1314,8 @@ pprintPTerm impl bnd = prettySe 10 bnd
1313 | inner > outer = lparen <> doc <> rparen
1314 | inner > outer = lparen <> doc <> rparen
1314 | otherwise = doc
1315 | otherwise = doc
1317+ kwd = annotate AnnKeyword . text
1316-- | Pretty-printer helper for the binding site of a name
1319-- | Pretty-printer helper for the binding site of a name
1317bindingOf :: Name -- ^^ the bound name
1320bindingOf :: Name -- ^^ the bound name
1318 -> Bool -- ^^ whether the name is implicit
1321 -> Bool -- ^^ whether the name is implicit