@@ -844,7 +844,7 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
844 | PDoBlock [PDo] -- ^ Do notation
844 | PDoBlock [PDo] -- ^ Do notation
845 | PIdiom FC PTerm -- ^ Idiom brackets
845 | PIdiom FC PTerm -- ^ Idiom brackets
846 | PReturn FC
846 | PReturn FC
847− | PMetavar Name -- ^ A metavariable, ?name
847+ | PMetavar FC Name -- ^ A metavariable, ?name, and its precise location
848 | PProof [PTactic] -- ^ Proof script
848 | PProof [PTactic] -- ^ Proof script
849 | PTactics [PTactic] -- ^ As PProof, but no auto solving
849 | PTactics [PTactic] -- ^ As PProof, but no auto solving
850 | PElabError Err -- ^ Error to report on elaboration
850 | PElabError Err -- ^ Error to report on elaboration
@@ -1063,7 +1063,7 @@ highestFC (PDoBlock lines) =
1064highestFC (PIdiom fc _) = Just fc
1064highestFC (PIdiom fc _) = Just fc
1065highestFC (PReturn fc) = Just fc
1065highestFC (PReturn fc) = Just fc
1066−highestFC (PMetavar _) = Nothing
1066+highestFC (PMetavar fc _) = Just fc
1067highestFC (PProof _) = Nothing
1067highestFC (PProof _) = Nothing
1068highestFC (PTactics _) = Nothing
1068highestFC (PTactics _) = Nothing
1069highestFC (PElabError _) = Nothing
1069highestFC (PElabError _) = Nothing
@@ -1620,7 +1620,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe startPrec bnd
1620 text "proof" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
1620 text "proof" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
1621 prettySe p bnd (PTactics ts) =
1621 prettySe p bnd (PTactics ts) =
1622 text "tactics" <+> lbrace <> nest nestingSize (text . show $ ts) <> rbrace
1622 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
1624 prettySe p bnd (PReturn f) = kwd "return"
1624 prettySe p bnd (PReturn f) = kwd "return"
1625 prettySe p bnd PImpossible = kwd "impossible"
1625 prettySe p bnd PImpossible = kwd "impossible"
1626 prettySe p bnd Placeholder = text "_"
1626 prettySe p bnd Placeholder = text "_"
@@ -1893,7 +1893,7 @@ instance Sized PTerm where
1893 size (PDoBlock dos) = 1 + size dos
1893 size (PDoBlock dos) = 1 + size dos
1894 size (PIdiom fc term) = 1 + size term
1894 size (PIdiom fc term) = 1 + size term
1895 size (PReturn fc) = 1
1895 size (PReturn fc) = 1
1896− size (PMetavar name) = 1
1896+ size (PMetavar _ name) = 1
1897 size (PProof tactics) = size tactics
1897 size (PProof tactics) = size tactics
1898 size (PElabError err) = size err
1898 size (PElabError err) = size err
1899 size PImpossible = 1
1899 size PImpossible = 1