chore: MetaHasEval TermElabM: print messages

This commit is contained in:
Sebastian Ullrich 2020-09-17 15:08:36 +02:00 committed by Leonardo de Moura
parent f4e6635f2b
commit 310fc986c1

View file

@ -1268,7 +1268,12 @@ Prod.fst <$> x.run ctx s
pure (a, sCore, sMeta, s)
instance MetaHasEval {α} [MetaHasEval α] : MetaHasEval (TermElabM α) :=
⟨fun env opts x _ => MetaHasEval.eval env opts $ x.run' mkSomeContext⟩
⟨fun env opts x _ =>
let x := finally x do {
s ← get;
liftIO $ s.messages.forM fun msg => msg.toString >>= IO.println
};
MetaHasEval.eval env opts $ x.run' mkSomeContext⟩
end Term