This code gives <stdin>: hGetBufSome: resource exhausted (Not enough space)
error as soon as it's executed.
import qualified Data.ByteString.Lazy.Char8 as B8
main = do
(l:_) <- B8.lines `fmap` B8.getContents
B8.putStrLn l
I'm just trying to get the first line. So because of lazy loading it wouldn't try to get others right? I can't figure out how to avoid this error.