From eb28c0981f4da42c15ac267f7f6ba28d6f8bffbc Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Mon, 11 Jun 2007 12:34:06 +0000 Subject: ok linearSolve --- lib/Data/Packed/Internal/Vector.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/Data') 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) infixl 0 // (//) = flip ($) +errorCode 1000 = "bad size" +errorCode 1001 = "bad function code" +errorCode 1002 = "memory problem" +errorCode 1003 = "bad file" +errorCode 1004 = "singular" +errorCode 1005 = "didn't converge" +errorCode n = "code "++show n + check msg ls f = do err <- f - when (err/=0) (error msg) + when (err/=0) (error (msg++": "++errorCode err)) mapM_ (touchForeignPtr . fptr) ls return () -- cgit v1.2.3