use TIO.hGetContents (cf. https://gist.github.com/4571530/)