From f8b7b3734fa6bb8d63914719e09d17940add27d4 Mon Sep 17 00:00:00 2001 From: Clark Gaebel Date: Sat, 10 Mar 2012 18:26:56 -0500 Subject: Removed foreign import safety. --- lib/Numeric/GSL/Fitting.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Numeric/GSL/Fitting.hs') diff --git a/lib/Numeric/GSL/Fitting.hs b/lib/Numeric/GSL/Fitting.hs index 79db23f..e5d0fd5 100644 --- a/lib/Numeric/GSL/Fitting.hs +++ b/lib/Numeric/GSL/Fitting.hs @@ -90,7 +90,7 @@ nlFitGen m f jac xiv epsabs epsrel maxit = unsafePerformIO $ do freeHaskellFunPtr jp return (subVector 2 p sol, path) -foreign import ccall "nlfit" +foreign import ccall unsafe "nlfit" c_nlfit:: CInt -> FunPtr TVV -> FunPtr TVM -> Double -> Double -> CInt -> CInt -> TVM ------------------------------------------------------- -- cgit v1.2.3 From 032fe19ddfa6e4cfba33f76aaa13043b54568fcf Mon Sep 17 00:00:00 2001 From: Clark Gaebel Date: Sun, 11 Mar 2012 11:41:58 -0400 Subject: Missed a couple safe annotations. --- lib/Numeric/GSL/Differentiation.hs | 4 ++-- lib/Numeric/GSL/Fitting.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Numeric/GSL/Fitting.hs') diff --git a/lib/Numeric/GSL/Differentiation.hs b/lib/Numeric/GSL/Differentiation.hs index 448ab63..d2a332c 100644 --- a/lib/Numeric/GSL/Differentiation.hs +++ b/lib/Numeric/GSL/Differentiation.hs @@ -48,7 +48,7 @@ derivGen c h f x = unsafePerformIO $ do freeHaskellFunPtr fp return result -foreign import ccall unsafe "gsl-aux.h deriv" +foreign import ccall safe "gsl-aux.h deriv" c_deriv :: CInt -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double -> Ptr Double -> Ptr Double -> IO CInt @@ -84,4 +84,4 @@ derivBackward = derivGen 2 {- | conversion of Haskell functions into function pointers that can be used in the C side -} -foreign import ccall unsafe "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) +foreign import ccall safe "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) diff --git a/lib/Numeric/GSL/Fitting.hs b/lib/Numeric/GSL/Fitting.hs index e5d0fd5..6343b76 100644 --- a/lib/Numeric/GSL/Fitting.hs +++ b/lib/Numeric/GSL/Fitting.hs @@ -90,7 +90,7 @@ nlFitGen m f jac xiv epsabs epsrel maxit = unsafePerformIO $ do freeHaskellFunPtr jp return (subVector 2 p sol, path) -foreign import ccall unsafe "nlfit" +foreign import ccall safe "nlfit" c_nlfit:: CInt -> FunPtr TVV -> FunPtr TVM -> Double -> Double -> CInt -> CInt -> TVM ------------------------------------------------------- -- cgit v1.2.3