patch applied (packages/HaXml): Use ByteString for output (contributed by Jason Dagit, with modifications)

Jason Dagit dagit at codersbase.com
Tue Nov 14 17:53:59 EST 2006


On 11/14/06, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:
> Hello Malcolm,
>
> Tuesday, November 14, 2006, 8:49:31 PM, you wrote:
>
> > involved, which is why I choose a different route.  I am open to further
> > ideas about how to best achieve a similar effect (i.e. ByteString ops
> > available, but minimal code duplication).
>
> use Stringable class from fps-soc

>From my point of view, I don't think I would have needed to write any
code when I modified HaXml if the pretty printer provided a lazy
bytestring version.  Maybe the more fundamental solution here would be
to create a lazy bytestring version of the pretty printer?

It would also be nice if the pretty printer came with a version that
runs in instances of MonadIO so that they write their output eagerly
instead of lazily.  My experience with haskell tells me that laziness
is wonderful, especially when you can separate the concerns of
computation and IO.  But, sometimes it seems that when you move to the
optimization phase of a project that, that same approach becomes a
problem and sometimes you end up needing to do your IO as soon/often
as you can to keep from having poor space behavior.

HTH,
Jason


More information about the Libraries mailing list