On 04/11/2009, at 14:07, Gregory Crosswhite wrote:

Actually, it's not a typo. If you look at the source, what you'll see is

indexU arr n = indexS (streamU arr) n

I suspect it gets rewritten back to the O(1) version somewhere after is has had a chance to fuse. If not, then it's a bug. In the vector package, I do this instead, though:

indexU arr n = <O(1) implemetation>

{-# RULES

"indexU/unstreamU"  forall s n. indexU (unstreamU s) n = indexS s n

#-}

Roman


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to