input - haskell hGetLines implementation -


does know can find the

hgetline :: handle -> io text 

function implementation? have implement http server in haskell has multiple subtasks. first 1 write implementation of

hgetlines :: handle -> io [text] 

function reads io channel until first empty line , lines returned list of text.

you don't need know how hgetline implemented this:

hgetlines :: handle -> io [text] hgetlines h =   line <- hgetline h   if null line     return []     else       lines <- hgetlines h       return (line:lines) 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -