@@ -969,7 +969,7 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
969 | PNoImplicits PTerm -- ^ never run implicit converions on the term
969 | PNoImplicits PTerm -- ^ never run implicit converions on the term
970 | PQuasiquote PTerm (Maybe PTerm) -- ^ `(Term [: Term])
970 | PQuasiquote PTerm (Maybe PTerm) -- ^ `(Term [: Term])
971 | PUnquote PTerm -- ^ ~Term
971 | 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.
973 | PRunElab FC PTerm [String] -- ^ %runElab tm - New-style proof script. Args are location, script, enclosing namespace.
973 | PRunElab FC PTerm [String] -- ^ %runElab tm - New-style proof script. Args are location, script, enclosing namespace.
974 | PConstSugar FC PTerm -- ^ A desugared constant. The FC is a precise source location that will be used to highlight it later.
974 | PConstSugar FC PTerm -- ^ A desugared constant. The FC is a precise source location that will be used to highlight it later.
975 deriving (Eq, Data, Typeable)
975 deriving (Eq, Data, Typeable)
@@ -1032,7 +1032,7 @@ mapPTermFC f g (PQuasiquote t1 t2) = PQuasiquote (mapPTermFC f g t1) (fmap (mapP
1032mapPTermFC f g (PUnquote t) = PUnquote (mapPTermFC f g t)
1032mapPTermFC f g (PUnquote t) = PUnquote (mapPTermFC f g t)
1033mapPTermFC f g (PRunElab fc tm ns) = PRunElab (f fc) (mapPTermFC f g tm) ns
1033mapPTermFC f g (PRunElab fc tm ns) = PRunElab (f fc) (mapPTermFC f g tm) ns
1034mapPTermFC f g (PConstSugar fc tm) = PConstSugar (g fc) (mapPTermFC f g tm)
1034mapPTermFC 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)
1038dg instance Binary PTerm
1038dg instance Binary PTerm
@@ -1259,7 +1259,7 @@ highestFC (PUnifyLog tm) = highestFC tm
1259highestFC (PNoImplicits tm) = highestFC tm
1259highestFC (PNoImplicits tm) = highestFC tm
1260highestFC (PQuasiquote _ _) = Nothing
1260highestFC (PQuasiquote _ _) = Nothing
1261highestFC (PUnquote tm) = highestFC tm
1261highestFC (PUnquote tm) = highestFC tm
1262−highestFC (PQuoteName _ fc) = Just fc
1262+highestFC (PQuoteName _ _ fc) = Just fc
1263highestFC (PRunElab fc _ _) = Just fc
1263highestFC (PRunElab fc _ _) = Just fc
1264highestFC (PConstSugar fc _) = Just fc
1264highestFC (PConstSugar fc _) = Just fc
1265highestFC (PAppImpl t _) = highestFC t
1265highestFC (PAppImpl t _) = highestFC t
@@ -1870,7 +1870,9 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1870 prettySe d p bnd (PQuasiquote t Nothing) = text "`(" <> prettySe (decD d) p [] t <> text ")"
1870 prettySe d p bnd (PQuasiquote t Nothing) = text "`(" <> prettySe (decD d) p [] t <> text ")"
1871 prettySe d p bnd (PQuasiquote t (Just g)) = text "`(" <> prettySe (decD d) p [] t <+> colon <+> prettySe (decD d) p [] g <> text ")"
1871 prettySe d p bnd (PQuasiquote t (Just g)) = text "`(" <> prettySe (decD d) p [] t <+> colon <+> prettySe (decD d) p [] g <> text ")"
1872 prettySe d p bnd (PUnquote t) = text "~" <> prettySe (decD d) p bnd t
1872 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 "}}"
1874 prettySe d p bnd (PRunElab _ tm _) =
1876 prettySe d p bnd (PRunElab _ tm _) =
1875 bracket p funcAppPrec . group . align . hang 2 $
1877 bracket p funcAppPrec . group . align . hang 2 $
1876 text "%runElab" <$>
1878 text "%runElab" <$>