Read_line, again ("blocking" needed)


I managed to get bs-readline installed, and even used it more or less appropriately in one context. But now I’ve got another context where I really, really want a “blocking readline”…something where I can write

let s:string = readALine();

and have it wait until a user types something ending with a newline, and then assign that string-value to s. The “bs-readline” model seems (quite reasonably!) to be the callback-model: I tell reasonML what to do when the user types something, and then I go on about my business, and when that event happens, my call-back procedure gets called. Is there some obvious way to turn this into a blocking version? I’m busy reading about Promises (and understanding almost nothing), async, and lots of other Javascript stuff that I’d hoped to never know.


We’ve resolved this problem, so it no longer needs an answer. --John