There's also something hyena addresses well but not in hack, i.e. the
iteratee style IO.
It's about constant space usage of memory when serving a request.
Hack is not suited at this task, since lazy IO will eventually consume
memory used for the entire request body, and it seems reliance on the
GC isn't always ideal. Running out of file handles is another problem,
but can be solved in various way by strictness hints, so it's not that
much an issue.
A backword compatible workaround is to add this iteratee IO in body as
a Maybe (Iteratee x) type, so those handler that can handle it will
use it. It at least makes it possible to use hack to write, e.g. a
Another progress in Happstack is the fileserve module, which essential
solves the same problem.
So hopefully hack will eventually incorporate this constant space IO
ability with an almost backward compatible way (on a condition of only
do customization on the request / response object with def, rather
then using them directly).