HeinrichApfelmus / hyper-haskell

The strongly hyped Haskell interpreter.
Other
360 stars 24 forks source link

Cell evaluation fails when done too early after opening #15

Open ggreif opened 7 years ago

ggreif commented 7 years ago

After opening a worksheet with associated .hs file (Main module) and too soon evaluating a cell, I get:

<interactive>:2:1: Not in scope: `Hyper.displayIO'
<interactive>:3:1: Not in scope: `mooreImg'
<interactive>:5:38: Not in scope: type constructor or class `IO'
<interactive>:5:41:
    Not in scope: type constructor or class `Graphic'

A remedy could be

HeinrichApfelmus commented 7 years ago

HyperHaskell is currently not very good at finding out when the interpreter is ready. At the moment, it simply waits ~2.4 seconds and hopes for the best.

// FIXME: more accurate indication that the interpreter process is ready
setTimeout(whenReady, 2400)
HeinrichApfelmus commented 3 years ago

I finally managed to do something about this in commit aef5e8057b57a4052a53add7a7b8fd0102385756 : The interpret now sends a message back to the window to signal that it is ready. Does that help?