diff options
author | Alberto Ruiz <aruiz@um.es> | 2012-03-13 15:23:30 +0100 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2012-03-13 15:23:30 +0100 |
commit | b959655b75da207fd7ac1c785a6ea9924d70d5a6 (patch) | |
tree | 0031778af5633100993d8447a5cbe021b1d3066f /lib/Numeric/GSL/Integration.hs | |
parent | c5fcca336f7d1ad6235d411268d8ff946bbe7f0c (diff) | |
parent | 0904bbd0befa48e98858def1b6d036c5b2f00bf1 (diff) |
Merge branch 'unsafe' into develop
Diffstat (limited to 'lib/Numeric/GSL/Integration.hs')
-rw-r--r-- | lib/Numeric/GSL/Integration.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Numeric/GSL/Integration.hs b/lib/Numeric/GSL/Integration.hs index 2330fc6..defbf80 100644 --- a/lib/Numeric/GSL/Integration.hs +++ b/lib/Numeric/GSL/Integration.hs | |||
@@ -32,7 +32,7 @@ import System.IO.Unsafe(unsafePerformIO) | |||
32 | 32 | ||
33 | {- | conversion of Haskell functions into function pointers that can be used in the C side | 33 | {- | conversion of Haskell functions into function pointers that can be used in the C side |
34 | -} | 34 | -} |
35 | foreign import ccall "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) | 35 | foreign import ccall safe "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) |
36 | 36 | ||
37 | -------------------------------------------------------------------- | 37 | -------------------------------------------------------------------- |
38 | {- | Numerical integration using /gsl_integration_qags/ (adaptive integration with singularities). For example: | 38 | {- | Numerical integration using /gsl_integration_qags/ (adaptive integration with singularities). For example: |
@@ -63,7 +63,7 @@ integrateQAGS prec n f a b = unsafePerformIO $ do | |||
63 | freeHaskellFunPtr fp | 63 | freeHaskellFunPtr fp |
64 | return result | 64 | return result |
65 | 65 | ||
66 | foreign import ccall "gsl-aux.h integrate_qags" | 66 | foreign import ccall safe "gsl-aux.h integrate_qags" |
67 | c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> CInt | 67 | c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> CInt |
68 | -> Ptr Double -> Ptr Double -> IO CInt | 68 | -> Ptr Double -> Ptr Double -> IO CInt |
69 | 69 | ||
@@ -94,7 +94,7 @@ integrateQNG prec f a b = unsafePerformIO $ do | |||
94 | freeHaskellFunPtr fp | 94 | freeHaskellFunPtr fp |
95 | return result | 95 | return result |
96 | 96 | ||
97 | foreign import ccall "gsl-aux.h integrate_qng" | 97 | foreign import ccall safe "gsl-aux.h integrate_qng" |
98 | c_integrate_qng :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double | 98 | c_integrate_qng :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double |
99 | -> Ptr Double -> Ptr Double -> IO CInt | 99 | -> Ptr Double -> Ptr Double -> IO CInt |
100 | 100 | ||
@@ -126,7 +126,7 @@ integrateQAGI prec n f = unsafePerformIO $ do | |||
126 | freeHaskellFunPtr fp | 126 | freeHaskellFunPtr fp |
127 | return result | 127 | return result |
128 | 128 | ||
129 | foreign import ccall "gsl-aux.h integrate_qagi" | 129 | foreign import ccall safe "gsl-aux.h integrate_qagi" |
130 | c_integrate_qagi :: FunPtr (Double-> Ptr() -> Double) -> Double -> CInt | 130 | c_integrate_qagi :: FunPtr (Double-> Ptr() -> Double) -> Double -> CInt |
131 | -> Ptr Double -> Ptr Double -> IO CInt | 131 | -> Ptr Double -> Ptr Double -> IO CInt |
132 | 132 | ||
@@ -159,7 +159,7 @@ integrateQAGIU prec n f a = unsafePerformIO $ do | |||
159 | freeHaskellFunPtr fp | 159 | freeHaskellFunPtr fp |
160 | return result | 160 | return result |
161 | 161 | ||
162 | foreign import ccall "gsl-aux.h integrate_qagiu" | 162 | foreign import ccall safe "gsl-aux.h integrate_qagiu" |
163 | c_integrate_qagiu :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> CInt | 163 | c_integrate_qagiu :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> CInt |
164 | -> Ptr Double -> Ptr Double -> IO CInt | 164 | -> Ptr Double -> Ptr Double -> IO CInt |
165 | 165 | ||
@@ -192,7 +192,7 @@ integrateQAGIL prec n f b = unsafePerformIO $ do | |||
192 | freeHaskellFunPtr fp | 192 | freeHaskellFunPtr fp |
193 | return result | 193 | return result |
194 | 194 | ||
195 | foreign import ccall "gsl-aux.h integrate_qagil" | 195 | foreign import ccall safe "gsl-aux.h integrate_qagil" |
196 | c_integrate_qagil :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> CInt | 196 | c_integrate_qagil :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> CInt |
197 | -> Ptr Double -> Ptr Double -> IO CInt | 197 | -> Ptr Double -> Ptr Double -> IO CInt |
198 | 198 | ||