summaryrefslogtreecommitdiff
path: root/lib/Numeric/GSL/Internal.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2012-03-13 11:21:21 +0100
committerAlberto Ruiz <aruiz@um.es>2012-03-13 11:21:21 +0100
commit9c4a8a37291f902312215452d0bdd9ad95408ae9 (patch)
tree72d468cfa9999dc079466f250883dfb131d016ba /lib/Numeric/GSL/Internal.hs
parent6f6455593c0490e4710854b08fc63a2d0993dcac (diff)
parent032fe19ddfa6e4cfba33f76aaa13043b54568fcf (diff)
Merge remote-tracking branch 'wowus/master' into unsafe
Diffstat (limited to 'lib/Numeric/GSL/Internal.hs')
-rw-r--r--lib/Numeric/GSL/Internal.hs10
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
29foreign import ccall "wrapper" 29foreign 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
33foreign import ccall "wrapper" 33foreign import ccall safe "wrapper"
34 mkVecVecfun :: TVV -> IO (FunPtr TVV) 34 mkVecVecfun :: TVV -> IO (FunPtr TVV)
35 35
36foreign import ccall "wrapper" 36foreign import ccall safe "wrapper"
37 mkDoubleVecVecfun :: (Double -> TVV) -> IO (FunPtr (Double -> TVV)) 37 mkDoubleVecVecfun :: (Double -> TVV) -> IO (FunPtr (Double -> TVV))
38 38
39aux_vTov :: (Vector Double -> Vector Double) -> TVV 39aux_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
49foreign import ccall "wrapper" 49foreign import ccall safe "wrapper"
50 mkVecMatfun :: TVM -> IO (FunPtr TVM) 50 mkVecMatfun :: TVM -> IO (FunPtr TVM)
51 51
52foreign import ccall "wrapper" 52foreign import ccall safe "wrapper"
53 mkDoubleVecMatfun :: (Double -> TVM) -> IO (FunPtr (Double -> TVM)) 53 mkDoubleVecMatfun :: (Double -> TVM) -> IO (FunPtr (Double -> TVM))
54 54
55aux_vTom :: (Vector Double -> Matrix Double) -> TVM 55aux_vTom :: (Vector Double -> Matrix Double) -> TVM