It won't be a problem here, but it looks like the standard solution
mentioned by Gabriel there is subtly quadratic for the reasons that ndmitchell
(the lines function in question is similar to your mkLines)
If that's right, then to avoid this one needs to do like ndmitchell and emulate
a simple way around this would be to do something like
L.purely PG.folds (fmap mconcat L.list) :: PB.FreeT (Producer ByteString m) m r -> Producer ByteString m r
The left fold collecting a list is a little strange; there are other ways of going about it, e.g.
mapping each bytestring chunk to a builder, using L.mconcat, etc.
Note that ByteString implements mconcat specially, not as `foldr mappend mempty` but with the
`concat` I linked above. Maybe `Control.Foldl.ByteString` should have its own concatenating
`Fold ByteString ByteString` This might pass through some strict list type to collect
the fragments before building the bytestring, though probably there is no problem with
the solution mentioned above.