From 5eba1bc309d7845366e8d00849d85426bf8f666d Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 8 Jan 2015 13:55:57 +0100 Subject: update other pkgs to ghc-7.10 --- packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'packages/sparse/src/Numeric') diff --git a/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs b/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs index 8608394..d75fec2 100644 --- a/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs +++ b/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs @@ -13,8 +13,11 @@ import System.IO.Unsafe(unsafePerformIO) import Foreign(Ptr) import Numeric.LinearAlgebra.HMatrix import Text.Printf -import Numeric.LinearAlgebra.Util((~!~)) +import Control.Monad(when) +(???) :: Bool -> String -> IO () +infixl 0 ??? +c ??? msg = when c (error msg) type IV t = CInt -> Ptr CInt -> t type V t = CInt -> Ptr Double -> t @@ -22,7 +25,7 @@ type SMxV = V (IV (IV (V (V (IO CInt))))) dss :: CSR -> Vector Double -> Vector Double dss CSR{..} b = unsafePerformIO $ do - size b /= csrNRows ~!~ printf "dss: incorrect sizes: (%d,%d) x %d" csrNRows csrNCols (size b) + size b /= csrNRows ??? printf "dss: incorrect sizes: (%d,%d) x %d" csrNRows csrNCols (size b) r <- createVector csrNCols app5 c_dss vec csrVals vec csrCols vec csrRows vec b vec r "dss" return r -- cgit v1.2.3