Hello Tad,
It can be defined in terms of rwhnf, Matrix is strict:
ghci> rwhnf $ [1,2,3,undefined::Double]
()
ghci> rwhnf $ (2><2) [1,2,3,undefined::Double]
*** Exception: Prelude.undefined
instance NFData (Matrix t) where
rnf = rwhnf
ms = [ident 3, (2><2) [1,2,3,undefined::Double]]
ghci
Hello,
Is there already an instance of NFData (from Control.DeepSeq in the
deepseq package) for the type Matrix (from Numeric.LinearAlgebra in
the hmatrix package) somewhere? If not, how does one define one?
(The data declaration for Matrix is in a hidden module,
Data.Packed.Internal.Matrix, if t