This is the source code for the Stackoverflow question "Squeezing more performance out of monadic streams in Haskell"