From 989bdf7e88c13500bd1986dcde36f6cc4f467efb Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Fri, 22 Jun 2007 10:21:15 +0000 Subject: reverting to the old signatures for aux C functions --- lib/GSL/Fourier.hs | 2 +- lib/GSL/Minimization.hs | 6 +++--- lib/GSL/Polynomials.hs | 2 +- lib/GSL/Vector.hs | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/GSL') diff --git a/lib/GSL/Fourier.hs b/lib/GSL/Fourier.hs index c8c79f0..bf6cd60 100644 --- a/lib/GSL/Fourier.hs +++ b/lib/GSL/Fourier.hs @@ -29,7 +29,7 @@ genfft code v = unsafePerformIO $ do c_fft code // vec v // vec r // check "fft" [v] return r -foreign import ccall "gsl-aux.h fft" c_fft :: Int -> Complex Double :> Complex Double :> IO Int +foreign import ccall "gsl-aux.h fft" c_fft :: Int -> TCVCV -- Complex Double :> Complex Double :> IO Int {- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave. diff --git a/lib/GSL/Minimization.hs b/lib/GSL/Minimization.hs index bc228a7..32b266f 100644 --- a/lib/GSL/Minimization.hs +++ b/lib/GSL/Minimization.hs @@ -97,7 +97,7 @@ minimizeNMSimplex f xi sz tol maxit = unsafePerformIO $ do foreign import ccall "gsl-aux.h minimize" c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int - -> Double :> Double :> Double ::> IO Int + -> TVVM -- Double :> Double :> Double ::> IO Int ---------------------------------------------------------------------------------- @@ -164,8 +164,8 @@ minimizeConjugateGradient istep minimpar tol maxit f df xi = unsafePerformIO $ d foreign import ccall "gsl-aux.h minimizeWithDeriv" c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double) -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ()) - -> Double -> Double -> Double -> Int - -> Double :> Double ::> IO Int + -> Double -> Double -> Double -> Int + -> TVM -- Double :> Double ::> IO Int --------------------------------------------------------------------- iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double) diff --git a/lib/GSL/Polynomials.hs b/lib/GSL/Polynomials.hs index d7db9a3..365c74e 100644 --- a/lib/GSL/Polynomials.hs +++ b/lib/GSL/Polynomials.hs @@ -51,4 +51,4 @@ polySolve' v | dim v > 1 = unsafePerformIO $ do return r | otherwise = error "polySolve on a polynomial of degree zero" -foreign import ccall "gsl-aux.h polySolve" c_polySolve:: Double :> Complex Double :> IO Int +foreign import ccall "gsl-aux.h polySolve" c_polySolve:: TVCV -- Double :> Complex Double :> IO Int diff --git a/lib/GSL/Vector.hs b/lib/GSL/Vector.hs index 3225139..fc80c16 100644 --- a/lib/GSL/Vector.hs +++ b/lib/GSL/Vector.hs @@ -122,7 +122,7 @@ toScalarR :: FunCodeS -> Vector Double -> Double toScalarR oper = toScalarAux c_toScalarR (fromEnum oper) foreign import ccall safe "gsl-aux.h toScalarR" - c_toScalarR :: Int -> Double :> Double :> IO Int + c_toScalarR :: Int -> TVV -- Double :> Double :> IO Int ------------------------------------------------------------------ @@ -131,14 +131,14 @@ vectorMapR :: FunCodeV -> Vector Double -> Vector Double vectorMapR = vectorMapAux c_vectorMapR foreign import ccall safe "gsl-aux.h mapR" - c_vectorMapR :: Int -> Double :> Double :> IO Int + c_vectorMapR :: Int -> TVV -- Double :> Double :> IO Int -- | map of complex vectors with given function vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper) foreign import ccall safe "gsl-aux.h mapC" - c_vectorMapC :: Int -> Complex Double :> Complex Double :> IO Int + c_vectorMapC :: Int -> TCVCV -- Complex Double :> Complex Double :> IO Int ------------------------------------------------------------------- @@ -147,14 +147,14 @@ vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper) foreign import ccall safe "gsl-aux.h mapValR" - c_vectorMapValR :: Int -> Ptr Double -> Double :> Double :> IO Int + c_vectorMapValR :: Int -> Ptr Double -> TVV -- Double :> Double :> IO Int -- | map of complex vectors with given function vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) vectorMapValC = vectorMapValAux c_vectorMapValC foreign import ccall safe "gsl-aux.h mapValC" - c_vectorMapValC :: Int -> Ptr (Complex Double) -> Complex Double :> Complex Double :> IO Int + c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV -- Complex Double :> Complex Double :> IO Int ------------------------------------------------------------------- @@ -163,13 +163,13 @@ vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double vectorZipR = vectorZipAux c_vectorZipR foreign import ccall safe "gsl-aux.h zipR" - c_vectorZipR :: Int -> Double :> Double :> Double :> IO Int + c_vectorZipR :: Int -> TVVV -- Double :> Double :> Double :> IO Int -- | elementwise operation on complex vectors vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double) vectorZipC = vectorZipAux c_vectorZipC foreign import ccall safe "gsl-aux.h zipC" - c_vectorZipC :: Int -> Complex Double :> Complex Double :> Complex Double :> IO Int + c_vectorZipC :: Int -> TCVCVCV -- Complex Double :> Complex Double :> Complex Double :> IO Int -- cgit v1.2.3