[Haskell-cafe] Array bug?

Don Stewart dons at galois.com
Mon Nov 3 13:55:22 EST 2008


ketil:
> Henning Thielemann <lemming at henning-thielemann.de> writes:
> 
> > I think it is a good idea to switch this feature on and off by a
> > compiler switch. 
> 
> I agree.  Same with Int overflow checking, if it can be done at all.
> 
> The interesting question is how to name it, the obvious
> 
>    -funsafe-optimization
> 
> might imply that these optimizations are fun and safe, which is
> probably misleading :-)

The uvector package as -funsafe, which disables bounds checking on
primitive reads/writes. It's a compile time flag to cabal that sets a
#define, that then let's GHC optimise away a guard.

So there's precedent.

-- Don


More information about the Haskell-Cafe mailing list