data Sparse_Matrix1= Sp_M1 (M.Array M.S M.Ix2 (Int32,Float) )
deriving (Show)
But it throwed an error
error:
• No instance for (M.Storable (Int32, Float))
arising from the first field of ‘Sp_M1’
(type ‘M.Array M.S M.Ix2 (Int32, Float)’)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Show Sparse_Matrix1)
deriving (Show)
How to write a instance for M.Storable (Int32,Float)?
I was writing a sparse matrix type
But it throwed an error
How to write a instance for M.Storable (Int32,Float)?