
Don Stewart wrote:
So there's two issues here:
1) Where does the basic unfolded sequence type, described in the stream fusion paper live?
data Stream a = forall s. Stream (s -> Step a s) s
data Step a s = Yield a !s | Skip !s | Done
Why not have a Data.Fusion.* hierarchy and put everything having to do with stream fusion there? In any case, we'll need to significantly expand the library if it is to be usable for both lists and arrays/bytestrings due to different strictness of the data structures. The underlying stream data type stays the same but some of the combinators change.
And then, 2) where do variants of base data structures reimplemented in terms of these streams live?
The question is: will those eventually replace the current implementations? Roman