summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Matrix.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-10-21 07:53:59 +0000
committerAlberto Ruiz <aruiz@um.es>2010-10-21 07:53:59 +0000
commit98b21c5ddcbc9fbfddd5dbec646916f016b43e6d (patch)
treebb7a8d27f833cb5dff93fb1489fc8a73a4b3201e /lib/Data/Packed/Matrix.hs
parentbed52f7c21afe7da9bc0a7fe52b748dbeda74610 (diff)
option -f-binary (for testing ghc7)
Diffstat (limited to 'lib/Data/Packed/Matrix.hs')
-rw-r--r--lib/Data/Packed/Matrix.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Data/Packed/Matrix.hs b/lib/Data/Packed/Matrix.hs
index de2300a..2922cbe 100644
--- a/lib/Data/Packed/Matrix.hs
+++ b/lib/Data/Packed/Matrix.hs
@@ -2,16 +2,16 @@
2{-# LANGUAGE FlexibleContexts #-} 2{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE FlexibleInstances #-} 3{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE MultiParamTypeClasses #-} 4{-# LANGUAGE MultiParamTypeClasses #-}
5{-# LANGUAGE CPP #-}
5 6
6----------------------------------------------------------------------------- 7-----------------------------------------------------------------------------
7-- | 8-- |
8-- Module : Data.Packed.Matrix 9-- Module : Data.Packed.Matrix
9-- Copyright : (c) Alberto Ruiz 2007-10 10-- Copyright : (c) Alberto Ruiz 2007-10
10-- License : GPL-style 11-- License : GPL
11-- 12--
12-- Maintainer : Alberto Ruiz <aruiz@um.es> 13-- Maintainer : Alberto Ruiz <aruiz@um.es>
13-- Stability : provisional 14-- Stability : provisional
14-- Portability : portable
15-- 15--
16-- A Matrix representation suitable for numerical computations using LAPACK and GSL. 16-- A Matrix representation suitable for numerical computations using LAPACK and GSL.
17-- 17--
@@ -43,16 +43,14 @@ import Data.Packed.Internal
43import qualified Data.Packed.ST as ST 43import qualified Data.Packed.ST as ST
44import Data.List(transpose,intersperse) 44import Data.List(transpose,intersperse)
45import Data.Array 45import Data.Array
46import Foreign.Storable
47
48-------------------------------------------------------------------
46 49
50#ifdef BINARY
47 51
48import Data.Binary 52import Data.Binary
49import Foreign.Storable
50import Control.Monad(replicateM) 53import Control.Monad(replicateM)
51--import Control.Arrow((***))
52--import GHC.Float(double2Float,float2Double)
53
54
55-------------------------------------------------------------------
56 54
57instance (Binary a, Element a, Storable a) => Binary (Matrix a) where 55instance (Binary a, Element a, Storable a) => Binary (Matrix a) where
58 put m = do 56 put m = do
@@ -67,6 +65,8 @@ instance (Binary a, Element a, Storable a) => Binary (Matrix a) where
67 xs <- replicateM r $ replicateM c get 65 xs <- replicateM r $ replicateM c get
68 return $ fromLists xs 66 return $ fromLists xs
69 67
68#endif
69
70------------------------------------------------------------------- 70-------------------------------------------------------------------
71 71
72instance (Show a, Element a) => (Show (Matrix a)) where 72instance (Show a, Element a) => (Show (Matrix a)) where