summaryrefslogtreecommitdiff
path: root/lib/Data
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-06-11 12:34:06 +0000
committerAlberto Ruiz <aruiz@um.es>2007-06-11 12:34:06 +0000
commiteb28c0981f4da42c15ac267f7f6ba28d6f8bffbc (patch)
tree4c55b9c31751536fdfb5016503cf8aba3990d418 /lib/Data
parent473df6136476dfa07331dd25a6020260c4f02a9b (diff)
ok linearSolve
Diffstat (limited to 'lib/Data')
-rw-r--r--lib/Data/Packed/Internal/Vector.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs
index 8f4e6a4..4836bdb 100644
--- a/lib/Data/Packed/Internal/Vector.hs
+++ b/lib/Data/Packed/Internal/Vector.hs
@@ -41,9 +41,17 @@ on f g = \x y -> f (g x) (g y)
41infixl 0 // 41infixl 0 //
42(//) = flip ($) 42(//) = flip ($)
43 43
44errorCode 1000 = "bad size"
45errorCode 1001 = "bad function code"
46errorCode 1002 = "memory problem"
47errorCode 1003 = "bad file"
48errorCode 1004 = "singular"
49errorCode 1005 = "didn't converge"
50errorCode n = "code "++show n
51
44check msg ls f = do 52check msg ls f = do
45 err <- f 53 err <- f
46 when (err/=0) (error msg) 54 when (err/=0) (error (msg++": "++errorCode err))
47 mapM_ (touchForeignPtr . fptr) ls 55 mapM_ (touchForeignPtr . fptr) ls
48 return () 56 return ()
49 57