diff options
author | Clark Gaebel <cgaebel@csclub.uwaterloo.ca> | 2012-03-11 11:41:58 -0400 |
---|---|---|
committer | Clark Gaebel <cgaebel@csclub.uwaterloo.ca> | 2012-03-11 11:41:58 -0400 |
commit | 032fe19ddfa6e4cfba33f76aaa13043b54568fcf (patch) | |
tree | e941e0fca86779b52e795d5ab3b11ce67b2a4565 | |
parent | 7832cb74240ba06a23a981c20db3c5da8324828a (diff) |
Missed a couple safe annotations.
-rw-r--r-- | lib/Numeric/GSL/Differentiation.hs | 4 | ||||
-rw-r--r-- | lib/Numeric/GSL/Fitting.hs | 2 |
2 files changed, 3 insertions, 3 deletions
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 | |||
48 | freeHaskellFunPtr fp | 48 | freeHaskellFunPtr fp |
49 | return result | 49 | return result |
50 | 50 | ||
51 | foreign import ccall unsafe "gsl-aux.h deriv" | 51 | foreign import ccall safe "gsl-aux.h deriv" |
52 | c_deriv :: CInt -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double | 52 | c_deriv :: CInt -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double |
53 | -> Ptr Double -> Ptr Double -> IO CInt | 53 | -> Ptr Double -> Ptr Double -> IO CInt |
54 | 54 | ||
@@ -84,4 +84,4 @@ derivBackward = derivGen 2 | |||
84 | 84 | ||
85 | {- | conversion of Haskell functions into function pointers that can be used in the C side | 85 | {- | conversion of Haskell functions into function pointers that can be used in the C side |
86 | -} | 86 | -} |
87 | foreign import ccall unsafe "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) | 87 | 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 | |||
90 | freeHaskellFunPtr jp | 90 | freeHaskellFunPtr jp |
91 | return (subVector 2 p sol, path) | 91 | return (subVector 2 p sol, path) |
92 | 92 | ||
93 | foreign import ccall unsafe "nlfit" | 93 | foreign import ccall safe "nlfit" |
94 | c_nlfit:: CInt -> FunPtr TVV -> FunPtr TVM -> Double -> Double -> CInt -> CInt -> TVM | 94 | c_nlfit:: CInt -> FunPtr TVV -> FunPtr TVM -> Double -> Double -> CInt -> CInt -> TVM |
95 | 95 | ||
96 | ------------------------------------------------------- | 96 | ------------------------------------------------------- |