@@ -844,7 +844,7 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
844844 | PDoBlock [PDo] -- ^ Do notation
845845 | PIdiom FC PTerm -- ^ Idiom brackets
846846 | PReturn FC
847− | PMetavar Name -- ^ A metavariable, ?name
847+ | PMetavar FC Name -- ^ A metavariable, ?name, and its precise location
848848 | PProof [PTactic] -- ^ Proof script
849849 | PTactics [PTactic] -- ^ As PProof, but no auto solving
850850 | PElabError Err -- ^ Error to report on elaboration
@@ -1063,7 +1063,7 @@ highestFC (PDoBlock lines) =
10631063
10641064highestFC (PIdiom fc _) = Just fc
10651065highestFC (PReturn fc) = Just fc
1066−highestFC (PMetavar _) = Nothing
1066+highestFC (PMetavar fc _) = Just fc
10671067highestFC (PProof _) = Nothing
10681068highestFC (PTactics _) = Nothing
10691069highestFC (PElabError _) = Nothing
@@ -1620,7 +1620,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe startPrec bnd
16201620 text "proof" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
16211621 prettySe p bnd (PTactics ts) =
16221622 text "tactics" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
1623− prettySe p bnd (PMetavar n) = text "?" <> pretty n
1623+ prettySe p bnd (PMetavar _ n) = annotate (AnnName n (Just MetavarOutput) Nothing Nothing) $ text "?" <> pretty n
16241624 prettySe p bnd (PReturn f) = kwd "return"
16251625 prettySe p bnd PImpossible = kwd "impossible"
16261626 prettySe p bnd Placeholder = text "_"
@@ -1893,7 +1893,7 @@ instance Sized PTerm where
18931893 size (PDoBlock dos) = 1 + size dos
18941894 size (PIdiom fc term) = 1 + size term
18951895 size (PReturn fc) = 1
1896− size (PMetavar name) = 1
1896+ size (PMetavar _ name) = 1
18971897 size (PProof tactics) = size tactics
18981898 size (PElabError err) = size err
18991899 size PImpossible = 1