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
Post a Comment