[Haskell-cafe] What's the deal with Clean?

Roman Leshchinskiy rl at cse.unsw.edu.au
Tue Nov 3 23:30:19 EST 2009


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




More information about the Haskell-Cafe mailing list