[Haskell-beginners] Array and IArray

Rafael Gustavo da Cunha Pereira Pinto RafaelGCPP.Linux at gmail.com
Thu Feb 26 15:59:39 EST 2009


Please, post the error messages.

Maybe all is needed is an explicit type declaration...

On Thu, Feb 26, 2009 at 16:58, Francesco Bochicchio <bieffe62 at gmail.com>wrote:

> Hello all,
>
> I'm reading stuff about the different types of arrays in Haskell ...
>
> One of the things that I don't understand
>  If I do:
>
> import Data.Array
> arr = listArray (1,10) [1..]
>
> the type of arr is Array. My question is: is this array an instance of the
> type class defined in Data.Array.IArray?
> Or there is another kind of immutable boxed array somewhere in haskell
> libraries?
> The documentation makes a  reference to 'the Array type exported by
> Data.Array.IArray' but if I do:
>
> import Data.Array.IArray
> arr = listArray (1,10) [1..]
>
> I get a couple of compiler errors
>
> Ciao & thanks in advance
> -----
> FB
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>


-- 
Rafael Gustavo da Cunha Pereira Pinto
Electronic Engineer, MSc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090226/a80d9267/attachment.htm


More information about the Beginners mailing list