Don Stewart <d...@galois.com> writes:

> And what is Storable limited to?
>
> Ultimately they're all limited to the primops for reading and writing,
> and to what types we can encode in those. So:
>
>     primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp
>     ...
> {-
> instance Storable Double
> instance Storable Bool
> instance Storable Char
> instance Storable Int
> instance Storable Float
> ...
> -}
>
> {-
>
> instance UA ()
> instance (UA a, UA b) => UA (a :*: b)
> instance UA Bool
> instance UA Char
> instance UA Int
> instance UA Float
> instance UA Double
> ...
> -}
>
> So what's a type that's Storable, but not writable in UA (or UArray or ..)

So it's me who understand it wrong.  If I want some high
performance array with elements of custom data type, I'm
stuck with Array, anyway?

Is it possible to make

instance UA UserDefinedDataType

I'm not sure how to do that.  Can you give me some
clarification?


Thanks,
Xiao-Yong
-- 
    c/*    __o/*
    <\     * (__
    */\      <
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to