[Haskell-cafe] Combining stream and list fusion
rl at cse.unsw.edu.au
Wed Oct 12 11:14:04 CEST 2011
Bas van Dijk wrote:
> I'm trying to make the following faster:
> Data.Vector.Generic.fromList list
> where 'list' is some expression yielding a list.
Unfortunately, I don't think that's possible. The problem is that you
'list' will be expressed in terms of foldr/build and fromList would have
to produce a Stream, i.e., basically an unfoldr. But AFAIK, there is no
unfoldr/build fusion rule. There is one the other way round and vector
makes use of that in toList.
More information about the Haskell-Cafe