diff options
author | Alberto Ruiz <aruiz@um.es> | 2012-03-13 11:21:21 +0100 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2012-03-13 11:21:21 +0100 |
commit | 9c4a8a37291f902312215452d0bdd9ad95408ae9 (patch) | |
tree | 72d468cfa9999dc079466f250883dfb131d016ba /lib/Numeric/GSL/Internal.hs | |
parent | 6f6455593c0490e4710854b08fc63a2d0993dcac (diff) | |
parent | 032fe19ddfa6e4cfba33f76aaa13043b54568fcf (diff) |
Merge remote-tracking branch 'wowus/master' into unsafe
Diffstat (limited to 'lib/Numeric/GSL/Internal.hs')
-rw-r--r-- | lib/Numeric/GSL/Internal.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Numeric/GSL/Internal.hs b/lib/Numeric/GSL/Internal.hs index 303e7e1..84417ce 100644 --- a/lib/Numeric/GSL/Internal.hs +++ b/lib/Numeric/GSL/Internal.hs | |||
@@ -26,14 +26,14 @@ iv f n p = f (createV (fromIntegral n) copy "iv") where | |||
26 | return 0 | 26 | return 0 |
27 | 27 | ||
28 | -- | conversion of Haskell functions into function pointers that can be used in the C side | 28 | -- | conversion of Haskell functions into function pointers that can be used in the C side |
29 | foreign import ccall "wrapper" | 29 | foreign import ccall safe "wrapper" |
30 | mkVecfun :: (CInt -> Ptr Double -> Double) | 30 | mkVecfun :: (CInt -> Ptr Double -> Double) |
31 | -> IO( FunPtr (CInt -> Ptr Double -> Double)) | 31 | -> IO( FunPtr (CInt -> Ptr Double -> Double)) |
32 | 32 | ||
33 | foreign import ccall "wrapper" | 33 | foreign import ccall safe "wrapper" |
34 | mkVecVecfun :: TVV -> IO (FunPtr TVV) | 34 | mkVecVecfun :: TVV -> IO (FunPtr TVV) |
35 | 35 | ||
36 | foreign import ccall "wrapper" | 36 | foreign import ccall safe "wrapper" |
37 | mkDoubleVecVecfun :: (Double -> TVV) -> IO (FunPtr (Double -> TVV)) | 37 | mkDoubleVecVecfun :: (Double -> TVV) -> IO (FunPtr (Double -> TVV)) |
38 | 38 | ||
39 | aux_vTov :: (Vector Double -> Vector Double) -> TVV | 39 | aux_vTov :: (Vector Double -> Vector Double) -> TVV |
@@ -46,10 +46,10 @@ aux_vTov f n p nr r = g where | |||
46 | g = do unsafeWith v $ \p' -> copyArray r p' (fromIntegral nr) | 46 | g = do unsafeWith v $ \p' -> copyArray r p' (fromIntegral nr) |
47 | return 0 | 47 | return 0 |
48 | 48 | ||
49 | foreign import ccall "wrapper" | 49 | foreign import ccall safe "wrapper" |
50 | mkVecMatfun :: TVM -> IO (FunPtr TVM) | 50 | mkVecMatfun :: TVM -> IO (FunPtr TVM) |
51 | 51 | ||
52 | foreign import ccall "wrapper" | 52 | foreign import ccall safe "wrapper" |
53 | mkDoubleVecMatfun :: (Double -> TVM) -> IO (FunPtr (Double -> TVM)) | 53 | mkDoubleVecMatfun :: (Double -> TVM) -> IO (FunPtr (Double -> TVM)) |
54 | 54 | ||
55 | aux_vTom :: (Vector Double -> Matrix Double) -> TVM | 55 | aux_vTom :: (Vector Double -> Matrix Double) -> TVM |