feat: use Meta.Example.other ref : Syntax if it contains position information
This commit is contained in:
parent
b1023872b3
commit
1eff4be172
1 changed files with 8 additions and 1 deletions
|
|
@ -236,7 +236,14 @@ mkMessageCore ctx.fileName ctx.fileMap msgData severity (ref.getPos.getD ctx.cmd
|
|||
|
||||
/-- Auxiliary function for `liftMetaM` -/
|
||||
private def fromMetaException (ctx : Context) (ref : Syntax) (ex : Meta.Exception) : Exception :=
|
||||
Exception.ex $ Elab.Exception.error $ mkMessageAux ctx ref ex.toMessageData MessageSeverity.error
|
||||
let mk (ref : Syntax) : Exception :=
|
||||
Exception.ex $ Elab.Exception.error $ mkMessageAux ctx ref ex.toMessageData MessageSeverity.error;
|
||||
match ex with
|
||||
| Meta.Exception.other ref' ex =>
|
||||
match ref'.getPos with
|
||||
| some _ => mk ref'
|
||||
| _ => mk ref
|
||||
| _ => mk ref
|
||||
|
||||
/-- Auxiliary function for `liftMetaM` -/
|
||||
private def fromMetaState (ref : Syntax) (ctx : Context) (s : State) (newS : Meta.State) (oldTraceState : TraceState) : State :=
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue