diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-06-22 10:21:15 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-06-22 10:21:15 +0000 |
commit | 989bdf7e88c13500bd1986dcde36f6cc4f467efb (patch) | |
tree | b30ff0dd52e2b6c2adb1dfe8759d03234f65c684 /lib/Data/Packed/Internal/Vector.hs | |
parent | aa14e6615533e7bd5e2b15acdc3ec76afbe1aac4 (diff) |
reverting to the old signatures for aux C functions
Diffstat (limited to 'lib/Data/Packed/Internal/Vector.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index 125df1e..8848062 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs | |||
@@ -21,8 +21,9 @@ import Complex | |||
21 | import Control.Monad(when) | 21 | import Control.Monad(when) |
22 | 22 | ||
23 | type Vc t s = Int -> Ptr t -> s | 23 | type Vc t s = Int -> Ptr t -> s |
24 | infixr 5 :> | 24 | -- not yet admitted by my haddock version |
25 | type t :> s = Vc t s | 25 | -- infixr 5 :> |
26 | -- type t :> s = Vc t s | ||
26 | 27 | ||
27 | vec :: Vector t -> (Vc t s) -> s | 28 | vec :: Vector t -> (Vc t s) -> s |
28 | vec v f = f (dim v) (ptr v) | 29 | vec v f = f (dim v) (ptr v) |
@@ -118,10 +119,10 @@ constantAux fun n x = unsafePerformIO $ do | |||
118 | return v | 119 | return v |
119 | 120 | ||
120 | foreign import ccall safe "aux.h constantR" | 121 | foreign import ccall safe "aux.h constantR" |
121 | cconstantR :: Ptr Double -> Double :> IO Int | 122 | cconstantR :: Ptr Double -> TV -- Double :> IO Int |
122 | 123 | ||
123 | foreign import ccall safe "aux.h constantC" | 124 | foreign import ccall safe "aux.h constantC" |
124 | cconstantC :: Ptr (Complex Double) -> Complex Double :> IO Int | 125 | cconstantC :: Ptr (Complex Double) -> TCV -- Complex Double :> IO Int |
125 | 126 | ||
126 | constant :: Field a => Int -> a -> Vector a | 127 | constant :: Field a => Int -> a -> Vector a |
127 | constant n x | isReal id x = scast $ constantR n (scast x) | 128 | constant n x | isReal id x = scast $ constantR n (scast x) |