@@ -1697,6 +1697,9 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1698 startPrec = 0
1698 startPrec = 0
1699 funcAppPrec = 10
1699 funcAppPrec = 10
1700+ lbrace = annotate (AnnSyntax "{") (text "{")
1701+ rbrace = annotate (AnnSyntax "}") (text "}")
1702+ percent = annotate (AnnSyntax "%") (text "%")
1701 prettySe :: Maybe Int -> Int -> [(Name, Bool)] -> PTerm -> Doc OutputAnnotation
1704 prettySe :: Maybe Int -> Int -> [(Name, Bool)] -> PTerm -> Doc OutputAnnotation
1702 prettySe d p bnd (PQuote r) =
1705 prettySe d p bnd (PQuote r) =
@@ -1709,7 +1712,8 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1709 prettySe d p bnd (PLam fc n nfc ty sc) =
1712 prettySe d p bnd (PLam fc n nfc ty sc) =
1710 let (ns, sc') = getLamNames [n] sc in
1713 let (ns, sc') = getLamNames [n] sc in
1711 depth d . bracket p startPrec . group . align . hang 2 $
1714 depth d . bracket p startPrec . group . align . hang 2 $
1715+ (annotate (AnnSyntax "\\") (text "\\"))
1712− text "\\" <> prettyBindingsOf ns False <+> text "=>" <$>
1716+ <> prettyBindingsOf ns False <+> text "=>" <$>
1713 prettySe (decD d) startPrec ((n, False):bnd) sc'
1717 prettySe (decD d) startPrec ((n, False):bnd) sc'
1715 getLamNames acc (PLam fc n nfc ty sc) = getLamNames (n : acc) sc
1719 getLamNames acc (PLam fc n nfc ty sc) = getLamNames (n : acc) sc
@@ -1749,7 +1753,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1751 case s of
1755 case s of
1752− Static -> text "%static" <> space
1756+ Static -> percent <> text "static" <> space
1753 _ -> empty
1757 _ -> empty
1754 prettySe d p bnd (PPi (Imp l s _ fa _ rig) n _ ty sc)
1758 prettySe d p bnd (PPi (Imp l s _ fa _ rig) n _ ty sc)
1755 | ppopt_impl ppo =
1759 | ppopt_impl ppo =
@@ -1769,7 +1773,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1771 case s of
1775 case s of
1772− Static -> text "%static" <> space
1776+ Static -> percent <> text "static" <> space
1773 _ -> empty
1777 _ -> empty
1774 prettySe d p bnd (PPi (Constraint _ _ rig) n _ ty sc) =
1778 prettySe d p bnd (PPi (Constraint _ _ rig) n _ ty sc) =
1775 depth d . bracket p startPrec $
1779 depth d . bracket p startPrec $
@@ -1876,7 +1880,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1876 , kwd "else" <+> prettySe (decD d) startPrec bnd f
1880 , kwd "else" <+> prettySe (decD d) startPrec bnd f
1878 prettySe d p bnd (PHidden tm) = text "." <> prettySe (decD d) funcAppPrec bnd tm
1882 prettySe d p bnd (PHidden tm) = text "." <> prettySe (decD d) funcAppPrec bnd tm
1879− prettySe d p bnd (PResolveTC _) = kwd "%implementation"
1883+ prettySe d p bnd (PResolveTC _) = percent <> kwd "implementation"
1880 prettySe d p bnd (PTrue _ IsType) = annName unitTy $ text "()"
1884 prettySe d p bnd (PTrue _ IsType) = annName unitTy $ text "()"
1881 prettySe d p bnd (PTrue _ IsTerm) = annName unitCon $ text "()"
1885 prettySe d p bnd (PTrue _ IsTerm) = annName unitCon $ text "()"
1882 prettySe d p bnd (PTrue _ TypeOrTerm) = text "()"
1886 prettySe d p bnd (PTrue _ TypeOrTerm) = text "()"
@@ -1981,7 +1985,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1981 end = if res then "}" else "}}"
1985 end = if res then "}" else "}}"
1982 prettySe d p bnd (PRunElab _ tm _) =
1986 prettySe d p bnd (PRunElab _ tm _) =
1983 bracket p funcAppPrec . group . align . hang 2 $
1987 bracket p funcAppPrec . group . align . hang 2 $
1984− text "%runElab" <$>
1988+ (percent <> text "runElab") <$>
1985 prettySe (decD d) funcAppPrec bnd tm
1989 prettySe (decD d) funcAppPrec bnd tm
1986 prettySe d p bnd (PConstSugar fc tm) = prettySe d p bnd tm -- should never occur, but harmless
1990 prettySe d p bnd (PConstSugar fc tm) = prettySe d p bnd tm -- should never occur, but harmless
1987 prettySe d p bnd _ = text "missing pretty-printer for term"
1991 prettySe d p bnd _ = text "missing pretty-printer for term"