Zulip Chat Archive

Stream: lean4

Topic: Incremental printing to infoview


Adam Topaz (Jun 05 2023 at 16:31):

Suppose I have a command of the form

elab "test" : command => do
  IO.println "test1"
  IO.sleep 5000
  IO.println "test2"

Is there some (simple) way to make the println command actually print incrementally to the infoview, so that test1 prints first, and 5 second later, test2 prints?

Henrik Böving (Jun 05 2023 at 17:52):

have you tried using trace instead?

Henrik Böving (Jun 05 2023 at 17:52):

although I am not sure that would work either

Mac Malone (Jun 05 2023 at 18:21):

You could use an asynchronous Task, but, unfortunately due to lean4#738, asynchronous printing is broken.

Sebastian Ullrich (Jun 05 2023 at 19:20):

Anything in this direction would require quite a bit of restructuring of the language server

Adam Topaz (Jun 05 2023 at 19:31):

Thanks all. I'll just work harder at making my code faster :)


Last updated: Dec 20 2023 at 11:08 UTC