From ef95be4403d09ebecbaef80e668d52fc5ecd9b46 Mon Sep 17 00:00:00 2001
From: Tom Smeding <tom@tomsmeding.com>
Date: Tue, 25 Feb 2025 23:56:33 +0100
Subject: Pretty: Allow colouring exts (currently not)

---
 src/AST/Pretty.hs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/AST')

diff --git a/src/AST/Pretty.hs b/src/AST/Pretty.hs
index 35c78c1..c7b1497 100644
--- a/src/AST/Pretty.hs
+++ b/src/AST/Pretty.hs
@@ -298,7 +298,7 @@ ppLam args body = ppString "(" <> hang 2 (ppString "\\" <> sep (args ++ [ppStrin
                                           <> softline <> body <> ppString ")")
 
 ppX :: PrettyX x => Expr x env t -> ADoc
-ppX expr = ppString $ prettyXsuffix (extOf expr)
+ppX expr = annotate AExt $ ppString $ prettyXsuffix (extOf expr)
 
 data Fixity = Prefix | Infix
   deriving (Show)
@@ -352,7 +352,7 @@ ppParen :: Bool -> Doc x -> Doc x
 ppParen True = parens
 ppParen False = id
 
-data Annot = AKey | AWith | AHighlight | AMonoid
+data Annot = AKey | AWith | AHighlight | AMonoid | AExt
   deriving (Show)
 
 annotToANSI :: Annot -> PT.AnsiStyle
@@ -360,6 +360,7 @@ annotToANSI AKey = PT.bold
 annotToANSI AWith = PT.color PT.Red <> PT.underlined
 annotToANSI AHighlight = PT.color PT.Blue
 annotToANSI AMonoid = PT.color PT.Green
+annotToANSI AExt = mempty
 
 type ADoc = Doc Annot
 
-- 
cgit v1.2.3-70-g09d2