[Haskell-cafe] how to write a pipes Consumer which return a final state