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

Don Stewart dons at galois.com
Wed Nov 4 00:25:06 EST 2009

> Oh, that's strange...  the type class "UA" is defined twice, once in  
> Data.Array.Vector and once in Data.Array.Vector.UArr;  in the first  

No, its exported from the former.

> module indexU is a separate function with the sources I exhibited, in  
> the second module it is a method of the UA type-class which seems to  
> have O(1) access for most of the defined instances.
> That's incredibly confusing...

There's direct and stream-based versions. You can choose which
version you need. If you use the stream-based implementations, the
compiler will apply the stream fusion optimization to your loops. If you
use the direct versions, that won't apply.

I'd be happy to talk more about the design of the library, if you like.

-- Don

More information about the Haskell-Cafe mailing list