[Haskell-cafe] Why is this array use wrong?

Maurí­cio briqueabraque at yahoo.com
Sat Dec 16 06:56:41 EST 2006


   Hi,

   I'm trying this in ghci:

let b = array (1,33) [(i,False) | i <- [1..33]]

after :m Data.Array.IArray. It gives me that error message:

<interactive>:1:8:
     No instance for (IArray a Bool)
       arising from use of `array' at <interactive>:1:8-12
     Probable fix: add an instance declaration for (IArray a Bool)
     In the definition of `b': b = array (1, 33) ([(i, False) | i <- [1 
.. 33]])

   Why?

   Thanks,
   Maurício



More information about the Haskell-Cafe mailing list