@@ -1068,13 +1068,13 @@ consoleDecorate ist AnnConstType = let theme = idris_colourTheme ist
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)
1070consoleDecorate ist AnnKeyword = colouriseKeyword (idris_colourTheme ist)
1070consoleDecorate ist AnnKeyword = colouriseKeyword (idris_colourTheme ist)
1071−consoleDecorate ist (AnnName n _ _) = let ctxt = tt_ctxt ist
1071+consoleDecorate ist (AnnName n _ _ _) = let ctxt = tt_ctxt ist
1072− theme = idris_colourTheme ist
1072+ theme = idris_colourTheme ist
1073− in case () of
1073+ in case () of
1074− _ | isDConName n ctxt -> colouriseData theme
1074+ _ | isDConName n ctxt -> colouriseData theme
1075− _ | isFnName n ctxt -> colouriseFun theme
1075+ _ | isFnName n ctxt -> colouriseFun theme
1076− _ | isTConName n ctxt -> colouriseType theme
1076+ _ | isTConName n ctxt -> colouriseType theme
1077− _ | otherwise -> id -- don't colourise unknown names
1077+ _ | otherwise -> id -- don't colourise unknown names
1078consoleDecorate ist (AnnFC _) = id
1078consoleDecorate ist (AnnFC _) = id
1079consoleDecorate ist (AnnTextFmt fmt) = Idris.Colours.colourise (colour fmt)
1079consoleDecorate ist (AnnTextFmt fmt) = Idris.Colours.colourise (colour fmt)
1080 where colour BoldText = IdrisColour Nothing True False True False
1080 where colour BoldText = IdrisColour Nothing True False True False
@@ -1189,16 +1189,16 @@ pprintPTerm impl bnd docArgs = prettySe 10 bnd
1190 sc (l, r) = nest nestingSize $ prettySe 10 bnd l <+> text "=>" <+> prettySe 10 bnd r
1190 sc (l, r) = nest nestingSize $ prettySe 10 bnd l <+> text "=>" <+> prettySe 10 bnd r
1191 prettySe p bnd (PHidden tm) = text "." <> prettySe 0 bnd tm
1191 prettySe p bnd (PHidden tm) = text "." <> prettySe 0 bnd tm
1192− prettySe p bnd (PRefl _ _) = annotate (AnnName eqCon Nothing Nothing) $ text "refl"
1192+ prettySe p bnd (PRefl _ _) = annName eqCon $ text "refl"
1193 prettySe p bnd (PResolveTC _) = text "resolvetc"
1193 prettySe p bnd (PResolveTC _) = text "resolvetc"
1194− prettySe p bnd (PTrue _ IsType) = annotate (AnnName unitTy Nothing Nothing) $ text "()"
1194+ prettySe p bnd (PTrue _ IsType) = annName unitTy $ text "()"
1195− prettySe p bnd (PTrue _ IsTerm) = annotate (AnnName unitCon Nothing Nothing) $ text "()"
1195+ prettySe p bnd (PTrue _ IsTerm) = annName unitCon $ text "()"
1196 prettySe p bnd (PTrue _ TypeOrTerm) = text "()"
1196 prettySe p bnd (PTrue _ TypeOrTerm) = text "()"
1197− prettySe p bnd (PFalse _) = annotate (AnnName falseTy Nothing Nothing) $ text "_|_"
1197+ prettySe p bnd (PFalse _) = annName falseTy $ text "_|_"
1198 prettySe p bnd (PEq _ l r) =
1198 prettySe p bnd (PEq _ l r) =
1199 bracket p 2 . align . group $
1199 bracket p 2 . align . group $
1200 prettySe 10 bnd l <+> eq <$> group (prettySe 10 bnd r)
1200 prettySe 10 bnd l <+> eq <$> group (prettySe 10 bnd r)
1201− where eq = annotate (AnnName eqTy Nothing Nothing) (text "=")
1201+ where eq = annName eqTy (text "=")
1202 prettySe p bnd (PRewrite _ l r _) =
1202 prettySe p bnd (PRewrite _ l r _) =
1203 bracket p 2 $
1203 bracket p 2 $
1204 text "rewrite" <+> prettySe 10 bnd l <+> text "in" <+> prettySe 10 bnd r
1204 text "rewrite" <+> prettySe 10 bnd l <+> text "in" <+> prettySe 10 bnd r
@@ -1210,28 +1210,28 @@ pprintPTerm impl bnd docArgs = prettySe 10 bnd
1210 map (prettySe 10 bnd) elts
1210 map (prettySe 10 bnd) elts
1211 where ann = case pun of
1211 where ann = case pun of
1212 TypeOrTerm -> id
1212 TypeOrTerm -> id
1213− IsType -> annotate (AnnName pairTy Nothing Nothing)
1213+ IsType -> annName pairTy
1214− IsTerm -> annotate (AnnName pairCon Nothing Nothing)
1214+ IsTerm -> annName pairCon
1215 prettySe p bnd (PDPair _ TypeOrTerm l t r) =
1215 prettySe p bnd (PDPair _ TypeOrTerm l t r) =
1216 lparen <> prettySe 10 bnd l <+> text "**" <+> prettySe 10 bnd r <> rparen
1216 lparen <> prettySe 10 bnd l <+> text "**" <+> prettySe 10 bnd r <> rparen
1217 prettySe p bnd (PDPair _ IsType (PRef _ n) t r) =
1217 prettySe p bnd (PDPair _ IsType (PRef _ n) t r) =
1218− annotate (AnnName sigmaTy Nothing Nothing) lparen <>
1218+ annName sigmaTy lparen <>
1219 bindingOf n False <+>
1219 bindingOf n False <+>
1220− annotate (AnnName sigmaTy Nothing Nothing) (text "**") <+>
1220+ annName sigmaTy (text "**") <+>
1221 prettySe 10 ((n, False):bnd) r <>
1221 prettySe 10 ((n, False):bnd) r <>
1222− annotate (AnnName sigmaTy Nothing Nothing) rparen
1222+ annName sigmaTy rparen
1223 prettySe p bnd (PDPair _ IsType l t r) =
1223 prettySe p bnd (PDPair _ IsType l t r) =
1224− annotate (AnnName sigmaTy Nothing Nothing) lparen <>
1224+ annName sigmaTy lparen <>
1225 prettySe 10 bnd l <+>
1225 prettySe 10 bnd l <+>
1226− annotate (AnnName sigmaTy Nothing Nothing) (text "**") <+>
1226+ annName sigmaTy (text "**") <+>
1227 prettySe 10 bnd r <>
1227 prettySe 10 bnd r <>
1228− annotate (AnnName sigmaTy Nothing Nothing) rparen
1228+ annName sigmaTy rparen
1229 prettySe p bnd (PDPair _ IsTerm l t r) =
1229 prettySe p bnd (PDPair _ IsTerm l t r) =
1230− annotate (AnnName existsCon Nothing Nothing) lparen <>
1230+ annName existsCon lparen <>
1231 prettySe 10 bnd l <+>
1231 prettySe 10 bnd l <+>
1232− annotate (AnnName existsCon Nothing Nothing) (text "**") <+>
1232+ annName existsCon (text "**") <+>
1233 prettySe 10 bnd r <>
1233 prettySe 10 bnd r <>
1234− annotate (AnnName existsCon Nothing Nothing) rparen
1234+ annName existsCon rparen
1235 prettySe p bnd (PAlternative a as) =
1235 prettySe p bnd (PAlternative a as) =
1236 lparen <> text "|" <> prettyAs <> text "|" <> rparen
1236 lparen <> text "|" <> prettyAs <> text "|" <> rparen
@@ -1268,6 +1268,9 @@ pprintPTerm impl bnd docArgs = prettySe 10 bnd
1268 prettyArgSc bnd val = lbrace <> lbrace <> prettySe 10 bnd val <> rbrace <> rbrace
1268 prettyArgSc bnd val = lbrace <> lbrace <> prettySe 10 bnd val <> rbrace <> rbrace
1269 prettyArgSti bnd (n, val) = lbrace <> kwd "auto" <+> pretty n <+> text "=" <+> prettySe 10 bnd val <> rbrace
1269 prettyArgSti bnd (n, val) = lbrace <> kwd "auto" <+> pretty n <+> text "=" <+> prettySe 10 bnd val <> rbrace
1271+ annName :: Name -> Doc OutputAnnotation -> Doc OutputAnnotation
1272+ annName n = annotate (AnnName n Nothing Nothing Nothing)
1271 basename :: Name -> Name
1274 basename :: Name -> Name
1272 basename (NS n _) = basename n
1275 basename (NS n _) = basename n
1273 basename n = n
1276 basename n = n
@@ -1333,7 +1336,7 @@ prettyName :: Bool -- ^^ whether to show namespaces
1333 -> Name -- ^^ the name to pprint
1336 -> Name -- ^^ the name to pprint
1334 -> Doc OutputAnnotation
1337 -> Doc OutputAnnotation
1335prettyName showNS bnd n | Just imp <- lookup n bnd = annotate (AnnBoundName n imp) (text (strName n))
1338prettyName showNS bnd n | Just imp <- lookup n bnd = annotate (AnnBoundName n imp) (text (strName n))
1336− | otherwise = annotate (AnnName n Nothing Nothing) (text (strName n))
1339+ | otherwise = annotate (AnnName n Nothing Nothing Nothing) (text (strName n))
1337 where strName (UN n) = T.unpack n
1340 where strName (UN n) = T.unpack n
1338 strName (NS n ns) | showNS = (concatMap (++ ".") . map T.unpack . reverse) ns ++ strName n
1341 strName (NS n ns) | showNS = (concatMap (++ ".") . map T.unpack . reverse) ns ++ strName n
1339 | otherwise = strName n
1342 | otherwise = strName n