Well, I got it working. It seems to behave sanely when put in a chain with other Enumeratee/Iteratee combinations, so I'm happy. My solution is posted on hpaste: http://hpaste.org/51430 . I'd love any criticism that anybody has, especially since it seems to me to be an ideal building block for the sorts of Enumeratees that I'm building.