Haskell streaming download
问题 The two resources I found that suggested recipes for streaming downloads using popular Haskell libraries were: https://haskell-lang.org/library/http-client#Streaming http://www.alfredodinapoli.com/posts/2013-07-20-slick-http-download-in-haskell.html How would I modify the code in the former to (a) save to file, and (b) print only a (take 5) of the byte response, rather than the whole response to stdout? My attempt at (b) is: #!/usr/bin/env stack {- stack --install-ghc --resolver lts-5.13