Broken ghc-7.0.3/vector combination?

Roman Leshchinskiy rl at
Wed Apr 20 19:11:07 CEST 2011

Daniel Fischer wrote:
> Further investigation of the sorting code in vector-algorithms revealed
> no bugs there, and if the runtime was forced to keep a keen eye on the
> indices, by replacing unsafeRead/Write/Swap with their bounds-checked
> counterparts or by 'trace'ing enough of their uses, the NaNs did not
> appear.

Did you replace them in vector-algorithms or in vector itself?

> So, is it possible that some change in ghc-7.0.3 vs. the previous
> versions caused a bad interaction between ghc-optimisations and vector
> fusion resulting in bad vector reads/writes?

Am I right in assuming that this happens in code which uses only mutable
vectors? Fusion only works for immutable ones so it shouldn't really
affect things here.

Have you tried playing around with code generation flags like -msse2?

In any case, I would try to take a look at this if you tell me how to


More information about the Glasgow-haskell-users mailing list