diff options
Diffstat (limited to 'lib/Numeric')
-rw-r--r-- | lib/Numeric/ContainerBoot.hs | 20 | ||||
-rw-r--r-- | lib/Numeric/GSL/Polynomials.hs | 2 |
2 files changed, 4 insertions, 18 deletions
diff --git a/lib/Numeric/ContainerBoot.hs b/lib/Numeric/ContainerBoot.hs index d913435..6ce4760 100644 --- a/lib/Numeric/ContainerBoot.hs +++ b/lib/Numeric/ContainerBoot.hs | |||
@@ -3,7 +3,9 @@ | |||
3 | {-# LANGUAGE FlexibleInstances #-} | 3 | {-# LANGUAGE FlexibleInstances #-} |
4 | {-# LANGUAGE MultiParamTypeClasses #-} | 4 | {-# LANGUAGE MultiParamTypeClasses #-} |
5 | {-# LANGUAGE UndecidableInstances #-} | 5 | {-# LANGUAGE UndecidableInstances #-} |
6 | #ifndef NOPOLYKINDS | ||
6 | {-# LANGUAGE PolyKinds #-} | 7 | {-# LANGUAGE PolyKinds #-} |
8 | #endif | ||
7 | 9 | ||
8 | ----------------------------------------------------------------------------- | 10 | ----------------------------------------------------------------------------- |
9 | -- | | 11 | -- | |
@@ -46,14 +48,11 @@ import Data.Packed.ST as ST | |||
46 | import Numeric.Conversion | 48 | import Numeric.Conversion |
47 | import Data.Packed.Internal | 49 | import Data.Packed.Internal |
48 | import Numeric.GSL.Vector | 50 | import Numeric.GSL.Vector |
49 | import Foreign.C.Types(CInt(..)) | ||
50 | import Data.Complex | 51 | import Data.Complex |
51 | import Control.Monad(ap) | 52 | import Control.Monad(ap) |
52 | 53 | ||
53 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) | 54 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) |
54 | 55 | ||
55 | import System.IO.Unsafe | ||
56 | |||
57 | ------------------------------------------------------------------- | 56 | ------------------------------------------------------------------- |
58 | 57 | ||
59 | type family IndexOf c | 58 | type family IndexOf c |
@@ -510,21 +509,6 @@ type instance ElementOf (Matrix a) = a | |||
510 | 509 | ||
511 | ------------------------------------------------------------ | 510 | ------------------------------------------------------------ |
512 | 511 | ||
513 | conjugateAux fun x = unsafePerformIO $ do | ||
514 | v <- createVector (dim x) | ||
515 | app2 fun vec x vec v "conjugateAux" | ||
516 | return v | ||
517 | |||
518 | conjugateQ :: Vector (Complex Float) -> Vector (Complex Float) | ||
519 | conjugateQ = conjugateAux c_conjugateQ | ||
520 | foreign import ccall "conjugateQ" c_conjugateQ :: TQVQV | ||
521 | |||
522 | conjugateC :: Vector (Complex Double) -> Vector (Complex Double) | ||
523 | conjugateC = conjugateAux c_conjugateC | ||
524 | foreign import ccall "conjugateC" c_conjugateC :: TCVCV | ||
525 | |||
526 | ----------------------------------------------------- | ||
527 | |||
528 | class Build f where | 512 | class Build f where |
529 | build' :: BoundsOf f -> f -> ContainerOf f | 513 | build' :: BoundsOf f -> f -> ContainerOf f |
530 | 514 | ||
diff --git a/lib/Numeric/GSL/Polynomials.hs b/lib/Numeric/GSL/Polynomials.hs index 9d1cf8c..c0318d7 100644 --- a/lib/Numeric/GSL/Polynomials.hs +++ b/lib/Numeric/GSL/Polynomials.hs | |||
@@ -19,7 +19,9 @@ module Numeric.GSL.Polynomials ( | |||
19 | polySolve | 19 | polySolve |
20 | ) where | 20 | ) where |
21 | 21 | ||
22 | #ifndef ABSTRACTCINT | ||
22 | import Foreign.C.Types(CInt(..)) | 23 | import Foreign.C.Types(CInt(..)) |
24 | #endif | ||
23 | import Data.Packed.Internal | 25 | import Data.Packed.Internal |
24 | import Data.Complex | 26 | import Data.Complex |
25 | import System.IO.Unsafe (unsafePerformIO) | 27 | import System.IO.Unsafe (unsafePerformIO) |