summaryrefslogtreecommitdiff
path: root/packages/gsl/src/Numeric/GSL/Fourier.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-06-19 13:55:39 +0200
committerAlberto Ruiz <aruiz@um.es>2015-06-19 13:55:39 +0200
commitdb50bc11dafa6834a4367427156306674063ed6b (patch)
tree721e9d0235168be1d0ebb2bd1dd254a66251f274 /packages/gsl/src/Numeric/GSL/Fourier.hs
parent7f9c7b5adf8f05653d15f19358f41c1916e8db70 (diff)
removed the annoying appN adapter for the foreign functions.
replaced by several overloaded app variants in the style of the module Internal.Foreign contributed by Mike Ledger.
Diffstat (limited to 'packages/gsl/src/Numeric/GSL/Fourier.hs')
-rw-r--r--packages/gsl/src/Numeric/GSL/Fourier.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/gsl/src/Numeric/GSL/Fourier.hs b/packages/gsl/src/Numeric/GSL/Fourier.hs
index d824b4f..1c2c053 100644
--- a/packages/gsl/src/Numeric/GSL/Fourier.hs
+++ b/packages/gsl/src/Numeric/GSL/Fourier.hs
@@ -1,3 +1,5 @@
1{-# LANGUAGE TypeFamilies #-}
2
1{- | 3{- |
2Module : Numeric.GSL.Fourier 4Module : Numeric.GSL.Fourier
3Copyright : (c) Alberto Ruiz 2006 5Copyright : (c) Alberto Ruiz 2006
@@ -23,7 +25,7 @@ import System.IO.Unsafe (unsafePerformIO)
23 25
24genfft code v = unsafePerformIO $ do 26genfft code v = unsafePerformIO $ do
25 r <- createVector (size v) 27 r <- createVector (size v)
26 app2 (c_fft code) vec v vec r "fft" 28 c_fft code # v # r #|"fft"
27 return r 29 return r
28 30
29foreign import ccall unsafe "gsl-aux.h fft" c_fft :: CInt -> TCV (TCV Res) 31foreign import ccall unsafe "gsl-aux.h fft" c_fft :: CInt -> TCV (TCV Res)
@@ -41,3 +43,4 @@ fft = genfft 0
41-- | The inverse of 'fft', using /gsl_fft_complex_inverse/. 43-- | The inverse of 'fft', using /gsl_fft_complex_inverse/.
42ifft :: Vector (Complex Double) -> Vector (Complex Double) 44ifft :: Vector (Complex Double) -> Vector (Complex Double)
43ifft = genfft 1 45ifft = genfft 1
46