title: Haskell - Read Lines from Handle without blocking
body: <p>I want to process the stdout of a process launched via <code>createProcess</code> linewise, but I can't  wait until a new line is available. My application will do something like this:</p>
  
  <ol>
  <li>Get all full lines from the output of some external program that are available without waiting</li>
  <li>Launch a job that processes these lines</li>
  <li>Once the job is completed, wait until at least one line of the external program's output is available and repeat</li>
  </ol>
  
  <p>I don't know how to implement 1. Is there an equivalent to <code>Handle</code>'s <code>hGetBufNonBlocking</code> that operates on a per-line basis? If not, what is the Haskell™ way to solve this problem? Use <code>hReady</code> and <code>hGetChar</code> to implement custom line buffering or some form of concurrency?</p>