@@ -969,7 +969,7 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
969969 | PNoImplicits PTerm -- ^ never run implicit converions on the term
970970 | PQuasiquote PTerm (Maybe PTerm) -- ^ `(Term [: Term])
971971 | PUnquote PTerm -- ^ ~Term
972− | PQuoteName Name FC -- ^ `{n} where the FC is the precise highlighting for the name in particular
972+ | PQuoteName Name Bool FC -- ^ `{n} where the FC is the precise highlighting for the name in particular. If the Bool is False, then it's `{{n}} and the name won't be resolved.
973973 | PRunElab FC PTerm [String] -- ^ %runElab tm - New-style proof script. Args are location, script, enclosing namespace.
974974 | PConstSugar FC PTerm -- ^ A desugared constant. The FC is a precise source location that will be used to highlight it later.
975975 deriving (Eq, Data, Typeable)
@@ -1032,7 +1032,7 @@ mapPTermFC f g (PQuasiquote t1 t2) = PQuasiquote (mapPTermFC f g t1) (fmap (mapP
10321032mapPTermFC f g (PUnquote t) = PUnquote (mapPTermFC f g t)
10331033mapPTermFC f g (PRunElab fc tm ns) = PRunElab (f fc) (mapPTermFC f g tm) ns
10341034mapPTermFC f g (PConstSugar fc tm) = PConstSugar (g fc) (mapPTermFC f g tm)
1035−mapPTermFC f g (PQuoteName n fc) = PQuoteName n (g fc)
1035+mapPTermFC f g (PQuoteName n x fc) = PQuoteName n x (g fc)
10361036
10371037{-!
10381038dg instance Binary PTerm
@@ -1259,7 +1259,7 @@ highestFC (PUnifyLog tm) = highestFC tm
12591259highestFC (PNoImplicits tm) = highestFC tm
12601260highestFC (PQuasiquote _ _) = Nothing
12611261highestFC (PUnquote tm) = highestFC tm
1262−highestFC (PQuoteName _ fc) = Just fc
1262+highestFC (PQuoteName _ _ fc) = Just fc
12631263highestFC (PRunElab fc _ _) = Just fc
12641264highestFC (PConstSugar fc _) = Just fc
12651265highestFC (PAppImpl t _) = highestFC t
@@ -1870,7 +1870,9 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
18701870 prettySe d p bnd (PQuasiquote t Nothing) = text "`(" <> prettySe (decD d) p [] t <> text ")"
18711871 prettySe d p bnd (PQuasiquote t (Just g)) = text "`(" <> prettySe (decD d) p [] t <+> colon <+> prettySe (decD d) p [] g <> text ")"
18721872 prettySe d p bnd (PUnquote t) = text "~" <> prettySe (decD d) p bnd t
1873− prettySe d p bnd (PQuoteName n _) = text "`{" <> prettyName True (ppopt_impl ppo) bnd n <> text "}"
1873+ prettySe d p bnd (PQuoteName n res _) = text start <> prettyName True (ppopt_impl ppo) bnd n <> text end
1874+ where start = if res then "`{" else "`{{"
1875+ end = if res then "}" else "}}"
18741876 prettySe d p bnd (PRunElab _ tm _) =
18751877 bracket p funcAppPrec . group . align . hang 2 $
18761878 text "%runElab" <$>