Bryan O'Sullivan committed e569a97

Fix a subtle laziness bug - thanks, QuickCheck!

We were streaming data out of the character buffer too late, so every
chunk we returned contained the same contents, namely whatever happened
to be in the last chunk we consumed while reading a line.

Comments (0)

Files changed (1)


  | otherwise     = withRawBuffer buf $ go
   go pbuf = do
-    let t = unstream (Stream next r (maxSize (w-r)))
+    let !t = unstream (Stream next r (maxSize (w-r)))
         w' = w - 1
     return $ if ix w' == '\r'
              then (t,w')