
2 Oct
2013
2 Oct
'13
10:45 a.m.
Excerpts from Karol Samborski's message of 2013-10-02 11:43:14 +0100:
This is because ghci doesn't know which instance of IArray to use. If you look at type signature of function 'array' you'll see that it returns some type 'a i e' where 'a e' is an instance of IArray class. So what you must do is simply tell it what 'a i e' you want. Try this:
array (1,100) [(i, i*i) | i <- [1..100]] :: CArray Int Int
Thank you for that explanation, it worked. -- Michal