diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Common.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Common.hs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 91985f7..bdd7f34 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs | |||
@@ -86,3 +86,42 @@ scast = fromJust . cast | |||
86 | {- | conversion of Haskell functions into function pointers that can be used in the C side | 86 | {- | conversion of Haskell functions into function pointers that can be used in the C side |
87 | -} | 87 | -} |
88 | foreign import ccall "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) | 88 | foreign import ccall "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) |
89 | |||
90 | --------------------------------------------------- | ||
91 | -- ugly, but my haddock version doesn't understand | ||
92 | -- yet infix type constructors | ||
93 | --------------------------------------------------- | ||
94 | ---------- signatures of the C functions ------- | ||
95 | ------------------------------------------------ | ||
96 | type PD = Ptr Double -- | ||
97 | type PC = Ptr (Complex Double) -- | ||
98 | type TV = Int -> PD -> IO Int -- | ||
99 | type TVV = Int -> PD -> TV -- | ||
100 | type TVVV = Int -> PD -> TVV -- | ||
101 | type TM = Int -> Int -> PD -> IO Int -- | ||
102 | type TMM = Int -> Int -> PD -> TM -- | ||
103 | type TMMM = Int -> Int -> PD -> TMM -- | ||
104 | type TVM = Int -> PD -> TM -- | ||
105 | type TVVM = Int -> PD -> TVM -- | ||
106 | type TMV = Int -> Int -> PD -> TV -- | ||
107 | type TMVM = Int -> Int -> PD -> TVM -- | ||
108 | type TMMVM = Int -> Int -> PD -> TMVM -- | ||
109 | type TCM = Int -> Int -> PC -> IO Int -- | ||
110 | type TCVCM = Int -> PC -> TCM -- | ||
111 | type TCMCVCM = Int -> Int -> PC -> TCVCM -- | ||
112 | type TMCMCVCM = Int -> Int -> PD -> TCMCVCM -- | ||
113 | type TCMCMCVCM = Int -> Int -> PC -> TCMCVCM -- | ||
114 | type TCMCM = Int -> Int -> PC -> TCM -- | ||
115 | type TVCM = Int -> PD -> TCM -- | ||
116 | type TCMVCM = Int -> Int -> PC -> TVCM -- | ||
117 | type TCMCMVCM = Int -> Int -> PC -> TCMVCM -- | ||
118 | type TCMCMCM = Int -> Int -> PC -> TCMCM -- | ||
119 | type TCV = Int -> PC -> IO Int -- | ||
120 | type TCVCV = Int -> PC -> TCV -- | ||
121 | type TCVCVCV = Int -> PC -> TCVCV -- | ||
122 | type TCMCV = Int -> Int -> PC -> TCV -- | ||
123 | type TVCV = Int -> PD -> TCV -- | ||
124 | type TCVM = Int -> PC -> TM -- | ||
125 | type TMCVM = Int -> Int -> PD -> TCVM -- | ||
126 | type TMMCVM = Int -> Int -> PD -> TMCVM -- | ||
127 | ------------------------------------------------ | ||