diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-06-19 13:55:39 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-06-19 13:55:39 +0200 |
commit | db50bc11dafa6834a4367427156306674063ed6b (patch) | |
tree | 721e9d0235168be1d0ebb2bd1dd254a66251f274 /packages/gsl/src/Numeric/GSL/Fourier.hs | |
parent | 7f9c7b5adf8f05653d15f19358f41c1916e8db70 (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.hs | 5 |
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 | {- | |
2 | Module : Numeric.GSL.Fourier | 4 | Module : Numeric.GSL.Fourier |
3 | Copyright : (c) Alberto Ruiz 2006 | 5 | Copyright : (c) Alberto Ruiz 2006 |
@@ -23,7 +25,7 @@ import System.IO.Unsafe (unsafePerformIO) | |||
23 | 25 | ||
24 | genfft code v = unsafePerformIO $ do | 26 | genfft 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 | ||
29 | foreign import ccall unsafe "gsl-aux.h fft" c_fft :: CInt -> TCV (TCV Res) | 31 | foreign 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/. |
42 | ifft :: Vector (Complex Double) -> Vector (Complex Double) | 44 | ifft :: Vector (Complex Double) -> Vector (Complex Double) |
43 | ifft = genfft 1 | 45 | ifft = genfft 1 |
46 | |||