diff options
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..4267b38 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 unsafe "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 unsafe "wrapper" |
34 | mkVecVecfun :: TVV -> IO (FunPtr TVV) | 34 | mkVecVecfun :: TVV -> IO (FunPtr TVV) |
35 | 35 | ||
36 | foreign import ccall "wrapper" | 36 | foreign import ccall unsafe "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 unsafe "wrapper" |
50 | mkVecMatfun :: TVM -> IO (FunPtr TVM) | 50 | mkVecMatfun :: TVM -> IO (FunPtr TVM) |
51 | 51 | ||
52 | foreign import ccall "wrapper" | 52 | foreign import ccall unsafe "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 |