[Haskell-cafe] unboxed arrays restricted to simple types (Int, Float, ..)

Svein Ove Aas svein.ove at aas.no
Wed Nov 11 07:28:50 EST 2009


On Wed, Nov 11, 2009 at 12:58 PM, Tillmann Vogt
<Tillmann.Vogt at rwth-aachen.de> wrote:
> Hi,
>
> I tried to use unboxed arrays for generating an antialiased texture. To make
> it easier to understand, here is the stripped down code that produces an
> error:
>
*snip*
>
> What do you think?
>
It is generally acknowledged that the array types bundled with GHC
have serious shortcomings, such as for example the one you just
pointed out. There is not, however, a consensus on how to change them.

To solve your particular problem, I would suggest looking up the
storablevector package on Hackage, which I know can handle arbitrary
unboxed elements.

That said, I'm sure someone will be along shortly to give you the full
story. :-)


-- 
Svein Ove Aas


More information about the Haskell-Cafe mailing list