|Maintainer||John Launchbury, email@example.com|
A low-tech concurrent interface to the console. When multiple threads want input, they send messages to the console with the format
The user supplies input to any requesting thread in a similar way:
At any time, the user can enter
!! to obtain a listing of all the
active prompts. Any input not of either of these forms is discarded.
example :: IO () example = setupStdinout processes processes :: IO () processes = do forkIO $ (prompt "Enter something" >> return ()) forkIO $ (prompt "Something else" >> return ()) prompt "quit" -- When the main thread dies, return () -- the whole interaction ends